Skip to content

Instantly share code, notes, and snippets.

@samkatakouzinos
Last active March 3, 2018 06:32
Show Gist options
  • Save samkatakouzinos/9445b026194af70ad31cae3e65005b59 to your computer and use it in GitHub Desktop.
Save samkatakouzinos/9445b026194af70ad31cae3e65005b59 to your computer and use it in GitHub Desktop.
MusicBrainz Picard File Naming script based on file tags
$noop( Original Source: https://github.com/avibrazil/picard-scripting/blob/master/Options%20%E2%9E%A1%20File%20Naming.txt )
$noop(© Avi Alkalay: freely distributable)
$noop(Please uncheck "Replace non-ASCII characters" and "Replace Windows-incompatible characters")
$noop(★★★★★ if you want to organize by genres, remove this line
$if(%genre%,
%genre%/,
)
if you want to organize by genres, remove this line too ★★★★★)
$set(_discFolder,0)
$if($eq($left($lower(%_albumartistForFilename%),4),the ),
$right(%_albumartistForFilename%, $sub($len(%_albumartistForFilename%),4)),
%_albumartistForFilename%
)/
%_albumForFilename%
$if($if2(%originaldate%,%date%),
\($left($if2(%originaldate%,%date%),4)\),
)/
$if($gt(%totaldiscs%,0),
$num(%discnumber%,2)-
$noop(
$if(%_discFolder%,
$if(%_discsubtitleForFilename%, %_discsubtitleForFilename%/, disc/),
·
)
)
)
$noop(
$num(%tracknumber%,2) $if($not($eq(%artist%,%albumartist%)),%_artistForFilename% ♫ )%_titleForFilename%
)
$num(%tracknumber%,2) $if($not($eq(%artist%,%albumartist%)),%_artistForFilename%,%_artistForFilename%) - %_titleForFilename%
$noop($num(%tracknumber%,2) %_titleForFilename%)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment