Created
June 3, 2023 00:46
-
-
Save OutOfFox/555995290fbb2747afb6fa0887898870 to your computer and use it in GitHub Desktop.
MusicBrainz Picard naming scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$upper(%_extension%)/ | |
$set(_aartist,$substr($if2(%albumartist%,%artist%),0,1)) | |
$if($in(0123456789,%_aartist%),#,$if($not($in(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,%_aartist%)),#,$upper(%_aartist%))) | |
/$if2(%albumartist%,%artist%) (%musicbrainz_albumartistid%)/ | |
%album% (%musicbrainz_albumid%)/ | |
$if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),%discnumber%)-,)$num(%tracknumber%,2) - %title% | |
Line by line: | |
Extension/ | |
Set variable to first letter of artist. | |
First letter - A-Z, or fall back to # for numbers, symbols and other scripts/ | |
Album artist if available, fall back to artist (MusicBrainz Artist ID)/ | |
Album title (MusicBrainz Album ID)/ | |
For multiple disc releases, use 1-01 | |
Example result: FLAC/P/PNAU (b04df404-eefa-4ae4-9f3e-ba220d9dce16)/Changa (90009c4b-e930-41f7-b221-d54daa15a71b)/03 - Go Bang.flac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$upper(%_extension%)/ | |
$set(_aartist,$substr($if2(%albumartist%,%artist%),0,1)) | |
$if($in(0123456789,%_aartist%),#,$if($not($in(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz,%_aartist%)),#,$upper(%_aartist%))) | |
/$if2(%albumartist%,%artist%)/ | |
%album%/ | |
$if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),%discnumber%)-,)$num(%tracknumber%,2) - %title% | |
Example result: FLAC/P/PNAU/Changa/03 - Go Bang.flac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment