[Solved] Beets pattern to Picard taggerscript help

Tags: #<Tag:0x00007fd2d8ccf828> #<Tag:0x00007fd2d8ccf760> #<Tag:0x00007fd2d8ccf698> #<Tag:0x00007fd2d8ccf5d0>

Hello folks. I have the following naming patterns in beets:

    albumtype:soundtrack: OST/[$original_year] - $album/[$album - ${disc_and_track}] - $artist - $title
    'series_name::.': Series/$series_name/[$original_year] - $album/[$album - $disc_and_track] - $artist - $title
    comp: Compilations/[$original_year] - $album/[$album - ${disc_and_track}] - $artist - $title
    singleton: Singles/$artist - $title
    default: Albums/$albumartist/[$original_year] - $album/$albumartist - [$album - $disc_and_track] %if{$diffartist,- $artist }- $title

I think this would require nested ‘if’ conditions, but I’m not sure in what order they ought to be. Could someone more adept at the taggerscript please help?


I don’t know beets configuration, but probably something like this for the different categories:

$if($eq(%album%,[non-album tracks]),
$noop(Everything else)

Not sure what “comp” and “singleton” really refer to. The above assumes comp is for Various Artist releases. If you also want to include everything with secondary type “compilation” you’d need a check like maybe $or($in(%_secondaryreleasetype%,compilation),$eq(%compilation%,1)).

The above assumes singleton refers to standalone-recordings. You have a few options here. By default Picard sets the album tag to “[non-album tracks]” for those (which can be customized in options). This is what the above checks. If you have scripted Picard to instead e.g. remove the album tag completely you could check for an empty album tag. Or maybe $not(%musicbrainz_albumid%).

Don’t know how the series_name thing gets handled by beets, but Picard has no support currently for MB series.


Thanks so much! This is exactly the nudge that I needed. I ended up with

OST/%_year% - %album%/[%album% - %_discandtracknumber%] - %artist% - %title%,
Compilations/%_year% - %album%/[%album% - %_discandtracknumber%] - %artist% - %title%,
$if($eq(%album%,[non-album tracks]),
Singles/%artist% - %title%,
Albums/%albumartist%/%_year% - %album%/%albumartist% - [%album% - %_discandtracknumber%] $if($eq(%_diffartist%,1),- %artist% )- %title%

It’s a pity that Picard doesn’t allow arbitrary tags (such as series names) to be used. Beets does, and that’s proved most helpful. For instance, the “Verve Jazz Masters” series has 60 CDs, most CDs with a single album artist, but with a few compilation albums as well. If Picard doesn’t allow using of arbitrary tags / series names, then I can’t arrange them all in a single directory.

Not sure what you mean, but you can use any tag you want. If you set a tag series_name and set this for all the files to “Verve Jazz Masters” you can then use %series_name% in your naming script.


I didn’t know that! Thanks, this is great, @outsidecontext. You’ve been super helpful. I’ll mark this topic “solved”.