4 ms·
Picard is amazingly powerful and I've used it for many years to manage my Music directory. I've done many tweaks to my file naming script over the years and I'm
by chungy 5y ago
Picard is amazingly powerful and I've used it for many years to manage my Music directory. I've done many tweaks to my file naming script over the years and I'm sure I'm not done. My current one looks like this:
$if2(%albumartist%,%artist%)/%album%
$if(%originaldate%,\($left(%originaldate%,4)\))/
$if($gt(%totaldiscs%,1),Disc %discnumber%
$if(%discsubtitle%,: %discsubtitle%,)/,)
$num(%tracknumber%,$if($lt(%totaltracks%,10),1,$if($lt(%totaltracks%,100),2,3)))
%title%
I have "Replace non-ASCII characters" and "Windows compatibility" both unchecked. At present I'm kind of 50/50 on single-digit track numbers for albums that have less than 10 tracks, kind of just used to everything being two digits (though I have a handful with greater than 99 tracks, so there's the concession there for triple-digit track numbers).
It's also very much optimized for my own use of the file system being my library management. I just change directory and play. ;)
- niedzielski 5y agoHere's mine. I am not sure how to format this without breaking it. $truncate($if2(%albumartist%,%artist%),143)/$truncate($if($if2(%originaldate%,%date%),$left($if2(%originaldate%,%date%),4) )%album%,143)$if(%discsubtitle%,/$truncate(%discsubtitle%,143))/$truncate($if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),$num(%discnumber%,1))-,)$if($ne(%tracknumber%,),$if($gt(%totaltracks%,99),$num(%tracknumber%,3),$if($gt(%totaltracks%,9),$num(%tracknumber%,2),$num(%tracknumber%,1))),) %title%,138) I think the truncations are necessary to avoid exceeding filename length limits on some systems. The if2s are to fallback to another field. Similar to yours, there is also logic for zero-padding as needed on discs and track numbers and to omit discs when there is only one. https://picard-docs.musicbrainz.org/v2.7/en/extending/scripting.html https://picard-docs.musicbrainz.org/v2.7/en/extending/script...
- mxmilkiib 5y agoHere's my personal system so far; $noop(requires: album-artist script) $noop(# define once what characters should be removed) $set(_unwantedchars,[’`'\\"”/\\-\\\\\\|;:\*\\?!&\\[\\]\\{\\}\(\)<>\\\,\\._\$\\#]) $noop(# if the id of release is "Various Artists", or the release is a dj-mix, or there is a djmixer name present, return true) $set(_variousrelease,$if($or($eq(%musicbrainz_albumartistid%,89ad4ac3-39f7-470e-963a-56509c546377),$inmulti(%releasetype%,dj-mix),$ne(%djmixer%,)),true,)) $noop(# if this is a Various Artists release, prepare to return trackartist later in the file path) $set(_trackartist,$replace($strip($if(%_variousrelease%, $rreplace(%artist%,%_unwantedchars%,)-,)), ,_)) $noop(# artist path variable, sort out characters) $set(_releaseartist,$replace($strip($rreplace(%albumartist%,%_unwantedchars%,)), ,_)) $noop(# prefer earliest date in release group over release date, sort out spaces and delimiters) $set(_releasedate,$replace($if(%originaldate%,%originaldate%,%date%),-,_)-) $noop(# cat name, sort out characters) $set(_catalognumber,$replace($strip($rreplace(%catalognumber%,%_unwantedchars%,)), ,_)-) $noop(# release name, sort out characters) $set(_releasealbum,$replace($strip($rreplace(%album%,%_unwantedchars%,)), ,_)) $noop(# release disc number, sort out characters) $set(_releasediscnum,$if($gt(%totaldiscs%,1),$num(%discnumber%,$if($gt(%totaldiscs%,99),3,$if($gt(%totaldiscs%,9),2,1)))-,)) $noop(# release track number, sort out characters) $set(_releasetracknum,$num(%tracknumber%,$if($gt(%totaltracks%,99),3,2))) $noop(# release track name path variable, sort out characters) $set(_releasetrack,$replace($strip($rreplace(%title%,%_unwantedchars%,)), ,_)) $noop(# build the full path up from the variables set above) %_releaseartist%/ %_releaseartist%-%_releasedate%%_catalognumber%%_releasealbum%/ %_releaseartist%-%_releasedate%%_releasealbum%-%_releasediscnum%%_releasetracknum%-%_trackartist%%_releasetrack% Workings out on https://wiki.thingsandstuff.org/Tagging_script https://wiki.thingsandstuff.org/Tagging_script Also, some of https://github.com/murdos/musicbrainz-userscripts https://github.com/murdos/musicbrainz-userscripts have been handy