Repository for neat file name string patterns and tagger script snippets

Great the syntax highlighting is online now :slight_smile: Now here is my renaming script, which is not so far away from the standard:

$if($is_video(),videos,music)/
$if($is_video(),
$noop(Video track)
$if($ne(%album%,[non-album tracks]),
$if2(%albumartist%,%artist%) - %album%$if(%discsubtitle%, - %discsubtitle%)/%_discandtracknumber%%title%,
Music Videos/%artist%/%artist% - %title%),
$if($eq(%compilation%,1),
$noop(Various Artist albums)
$firstalphachar($if2(%albumartistsort%,%artistsort%))/$if2(%albumartist%,%artist%)/%album%$if(%_releasecomment%, \(%_releasecomment%\),)/%_discandtracknumber%%artist% - %title%,
$noop(Single Artist Albums)
$firstalphachar($if2(%albumartistsort%,%artistsort%))/$if2(%albumartist%,%artist%)/%album%$if(%_releasecomment%, \(%_releasecomment%\),)/%_discandtracknumber%%title%
))

The special thing is that this also handles videos, which are stored separately from audio files, $is_video is part of the videotools plugin [1].

Here are some examples how this looks like for audio files.

Release by a single artist:

music/P/Paradise Lost/Say Just Words (silver version)/01-04 Say Just Words.flac

Compilation:

music/V/Various Artists/Century Media_ Covering 20 Years of Extremes/02-04 The Agonist - Monochromatic Stains.flac

For videos I use a more flat structure since I don’t have that many and also store them separately. I also distinguish between video releases (e.g. DVD) and just single videos.

Music video (from release):

videos/Paradise Lost - The Anatomy of Melancholy/01-12 As I Die.m4v

Music video (non-album track) [2]:

videos/Music Videos/Paradise Lost/Paradise Lost - Beneath Broken Earth.m4v

I also set some helper variables in Advanced -> Scripting:

$noop(
Helper variable to get the disc and track numbers in the from 01-12, unless it is a
non-album track. I always use the disc number in file names no matter if a release
has a single or multiple discs.
)
$set(_discandtracknumber,$if($ne(%album%,[non-album tracks]),$num(%discnumber%,2)-$num(%tracknumber%,2) ))

$noop(Remove "(promo video)" ETI from track titles)
$set(title,$replace(%title%, \(promo video\),))

  1. The videotools plugin is available on the Picard plugins page and provides some helper functions to ease working with videos in Picard. Unfortunately it does not work on Windows, I hope I will find some time to fix that.
  2. The redundancy of the artist name is intentional, that makes it easier to copy the file by itself without the entire structure.
2 Likes