Skip to content

Instantly share code, notes, and snippets.

@BenMcLean
Last active June 20, 2024 11:17
Show Gist options
  • Save BenMcLean/9eebf3b0489cbe16c25284a00e563c66 to your computer and use it in GitHub Desktop.
Save BenMcLean/9eebf3b0489cbe16c25284a00e563c66 to your computer and use it in GitHub Desktop.
$set(_year,$left($if2(%originaldate%,%date%),4))
$replace(
$replace(
$if(_year,%_year% )
%album%
$if($and(%releasetype%,$not($find(%releasetype%,album))), \(%releasetype%\))
\($if2(%albumartist%,%artist%)\)
$if($eq($upper(%_extension%),MP3),, $upper(%_extension%))
/
$if($gt(%totaldiscs%,1),$if(%discsubtitle%,CD$num(%discnumber%,$len(%totaldiscs%)) %discsubtitle%/)$num(%discnumber%,$len(%totaldiscs%))-,)
$num(%tracknumber%,$if($gt($len(%totaltracks%),2),$len(%totaltracks%),2)) %title%
$if($find(%albumartist%,Various), \(%artist%\))
,–,-)
,: , - )
$replace($if2(%artist%,%albumartist%) - %title%,–,-)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment