Edition‑Aware Naming Script for Picard

Hi all,

I’d like to share a Picard naming script I’ve been using to keep my music library clean and Plex/Lidarr‑friendly. It’s designed to:

  • Build tidy artist‑letter and artist folders

  • Create album folders in the form:
    (Year) Album [Type] (Edition/Disambiguation)

  • Add multi‑disc subfolders like CD 01, CD 02, …

  • Name files as:
    Artist-01-Title (Edition/Disambiguation)

  • Use a smart EDITION override: a local EDITION tag if present, otherwise the MusicBrainz release disambiguation (%_releasecomment%)

The idea is to be compatible with Lidarr‑style layouts and to make different editions (remasters, deluxe, live, etc.) clearly distinguishable in both folder structure and filenames, without having to edit the MusicBrainz database itself.


How the EDITION logic works

  • If you set an EDITION tag in Picard (for example Deluxe Edition 2015), the script will use that for the album folder and filename.

  • If EDITION is empty, it falls back to %_releasecomment% (the MusicBrainz release disambiguation).

  • If both are empty, no disambiguation is added.

So you get a clean default based on MusicBrainz, with the option to override locally per album.


Full Name format script

Paste this into Options → File Naming → Name format:

$noop(=== Artist letter folder ===)
$upper($left(%albumartistsort%,1))/

$noop(=== Artist folder: Clean name + disambiguation ===)
$if2(%albumartistsort%,%artistsort%,%artist%)$if(%_albumartistcomment%, \(%_albumartistcomment%\),)/

$noop(=== Album folder: \(Year\) Album [Type] \(Disambiguation via EDITION/_releasecomment\) ===)
($if2(%originalyear%,%year%)) %album%
$if($eq_any(%releasetype%,Album,album),, [%releasetype%])$if($if2(%edition%,%_releasecomment%), \($if2(%edition%,%_releasecomment%)\),)/

$noop(=== Multidisc subfolder: CD 01 / CD 02 ===)
$if($gt(%totaldiscs%,1),
CD $num(%discnumber%,2)/,
)

$noop(=== Filename: Artist-01-Title with EDITION/_releasecomment disambiguation ===)
$if(
$or(%compilation%,$eq(%albumartistsort%,Various Artists)),
$if2(%artist%,%albumartist%)-$num(%tracknumber%,2)-%title%$if($if2(%edition%,%_releasecomment%), \($if2(%edition%,%_releasecomment%)\),),
$if2(%albumartist%,%artist%)-$num(%tracknumber%,2)-%title%$if($if2(%edition%,%_releasecomment%), \($if2(%edition%,%_releasecomment%)\),)
)


Optional: scripting to populate EDITION

If you want Picard to auto‑fill EDITION from %_releasecomment% (while still allowing manual overrides), you can add this under Options → Scripting as a separate script:

$noop(=== EDITION mapping: local override + MusicBrainz disambiguation ===)

$noop(1. If EDITION is empty but _releasecomment exists, set EDITION from _releasecomment)
$if(
$and($not(%edition%),%_releasecomment%),
$set(EDITION,%_releasecomment%)
)

$noop(2. Mirror EDITION into a comment field for players / Plex, if desired)
$if(%edition%,
$set(comment:edition,%edition%)
)

$noop(3. If EDITION is still empty but _releasecomment exists, at least set comment:edition)
$if(
$and($not(%edition%),%_releasecomment%),
$set(comment:edition,%_releasecomment%)
)

This way:

  • You can manually set EDITION per album in Picard if you want a custom text.

  • If you don’t set it, the script uses the MusicBrainz disambiguation as a sensible default.


If anyone has suggestions to improve this further (e.g. better handling for specific release types, or nicer integration with other tools), I’d be happy to refine it.

2 Likes