Skip to content

Instantly share code, notes, and snippets.

@elliotchance
Last active March 1, 2026 01:16
Show Gist options
  • Select an option

  • Save elliotchance/29d073897a7daa6acf59973edfa1b3fd to your computer and use it in GitHub Desktop.

Select an option

Save elliotchance/29d073897a7daa6acf59973edfa1b3fd to your computer and use it in GitHub Desktop.
MusicBrainz Picard

Examples

The same release in different versions uses annotation:

  • Artists/Electric Callboy/Electric Callboy - TEKKNO (CD, 2022)/07 Electric Callboy - Parasite.flac
  • Artists/Electric Callboy/Electric Callboy - TEKKNO (CD, 2023, Tour Edition)/01 Electric Callboy - Pump It.flac

Only use the first (primary) artist for the folder, but retain multiple artists on the album folder (this keeps all releases from the same primary artist together):

  • Artists/Gareth Emery/Gareth Emery & Standerwick feat. HALIENE - Saving Light (Digital Media, Single, 2017)/Saving Light.flac

Track artists are retained:

  • Artists/Adventure Club/Adventure Club - Calling All Heroes (Digital Media, EP, 2013)/02 Adventure Club feat. The Kite String Tangle - Wonder.flac
  • Artists/Adventure Club/Adventure Club - Calling All Heroes (Digital Media, EP, 2013)/04 Adventure Club - Thunderclap.flac
  • Artists/Armin van Buuren/Armin van Buuren - Armin van Buuren 001_ A State of Trance (CD, 2000, Compilation, DJ Mix)/1-03 John Johnson - Impact (Van Bellen remix).flac

Compilations (Various Artists) are placed in a different root:

  • Compilations/The Fire This Time (CD, 2002, Compilation)/1-04 Soma - Get Thee Behind Me.flac

Groupings are also kept in a separate root folder with optional series number for ordering:

  • Groupings/Anjuna25/Alex Sonata & TheRio - 25 Years of Anjuna Mixed by Alex Sonata & TheRio (Digital Media, 2025, Compilation, DJ Mix)/2-04 Cramp - RU116 (Cramp 2020 mix).flac
  • Groupings/Dream Dance/0015 Various Artists - Dream Dance, Vol. 15 (CD, 2000, Compilation)/1-01 Miss Shiva - Dreams (single cut).flac

Instructions

  1. Fill in My Script
  2. Fill in File Naming
  3. Enable Settings > Metadata > Use release relationships

Usage

For the most part everything works except when you add a grouping you need to right clikc on the album and run the script again for the File Naming to be correct.

%_f1%/%_f2%/%_f3%/
$if($gt(%totaldiscs%,1),$if($gt(%totaldiscs%,9),$num(%discnumber%,2),%discnumber%)-,)
$if($gt(%totaltracks%,1),$if($and(%albumartist%,%tracknumber%),$num(%tracknumber%,2) ,),)
$if(%_multiartist%,%artist% - ,)
%title%
$if(%_originalalbum%,$set(album,%_originalalbum%),$set(_originalalbum,%album%))
$set(_primaryartist,$slice(%_albumartists%,0,1))
$set(_info,%media%\, %_primaryreleasetype%\, $year(%date%)\, %_secondaryreleasetype%)
$set(_info,$replace(%_info%,;,\,))
$set(_info,$replace(%_info%,audiobook,Audiobook))
$set(_info,$replace(%_info%,compilation,Compilation))
$set(_info,$replace(%_info%,dj-mix,DJ Mix))
$set(_info,$replace(%_info%,interview,Interview))
$set(_info,$replace(%_info%,live,Live))
$set(_info,$replace(%_info%,mixtape/street,Mixtape))
$set(_info,$replace(%_info%,remix,Remix))
$set(_info,$replace(%_info%,soundtrack,Soundtrack))
$set(_info,$replace(%_info%,spokenword,Spokenword))
$set(_info,$replace(%_info%,album,Album))
$set(_info,$replace(%_info%,single,Single))
$set(_info,$replace(%_info%,ep,EP))
$set(_info,$replace(%_info%,broadcast,Broadcast))
$set(_info,$replace(%_info%,other,Other))
$set(_info,$replace(%_info%,\, \, ,\, ))
$set(_info,$trim(%_info%,\, ))
$if(%_releasecomment%,
$set(album,%album% \(%_info%\, %_releasecomment%\)),
$set(album,%album% \(%_info%\))
)
$set(_f1,Artists)
$set(_f2,%_primaryartist%)
$set(_f3,$if2(%albumartist%,%artist%) - %album%)
$if($eq(%compilation%,1),
$set(_f1,Compilations)
$set(_f2,%album%)
$set(_f3,)
)
$if(%grouping%,
$set(_f1,Groupings)
$set(_f2,%grouping%)
$set(_f3,$if(%_releasegroup_seriesnumber%,$pad(%_releasegroup_seriesnumber%,4,0) )$if2(%albumartist%,%artist%) - %album%)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment