Musicbrainz Picard File Naming Sample Script for Plex

Server is on Version 1.20.2.3402
Plex Web is Version 4.44.2

Wanted to post my naming script for MusicBrainz Picard. It works well for my purpose and folder structure. Its a beginner script. I hope this script helps someone trying to name and organize files for Plex using Musicbrainz Picard like I am.

$if2(%albumartist%,%artist%)/$if($ne(%albumartist%,),%albumartist% - %album%/,)$if($gt(%totaldiscs%,1),Disc %discnumber%/,)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)- $if($eq(%albumartist%,Various Artists),%artist% - %title%,%title%)

The script is built on the default script, and is very basic. There is only one rule/thing to remember. For Compilation/Soundtrack CDs the Album Artist tag must be Various Artists. If the Album Artist tag is Various Artists then this script will do the following:

Example:
Various Artists / Various Artists - Gone In 60 Seconds / 03 - Moby - Flower

If the Album Artist Does not have Various Artists in the Album Artist tag, the script will do the following:

Example:
Oasis / Oasis - (What’s The Story) Morning Glory? / 03 - Wonderwall

If it is a multi disc album then the script will do the following:

Example:
Ellie Goulding / Ellie Goulding - Halcyon Days / Disc 1 / 1-01 - Don’t Say A Word
Ellie Goulding / Ellie Goulding - Halcyon Days / Disc 2 / 2-01 - Burn

This is my first script and very basic at that. I don’t understand scripting and am very much a beginner using Musicbrainz Picard. After a lot of trial and error I found something that worked the way I wanted and stopped fiddling with the script. I’m sure I will run into some albums that won’t be named right. But I will deal with those when the time comes and update my script then.

2 Likes

I’m actually working on correcting my library. I’ll be trying out your file naming script sample. At the moment, I’m fighting with Picard to stop naming the track number as 101 - Song name vs 01 - Song name (per Plex).

Wow, yours is way better. I haven’t started my Plex services, but I have a feeling that the formatting will work out. I’ll reply when I restart Plex services. Thank you! Big help.

Your welcome. Thank you for giving it a try and the kind words.

With a little help from a friend, we modified your syntax that worked well for my application. Here it is:

$if2(%albumartist%,%artist%) - %album%/$if($gt(%totaldiscs%,1),Disc %discnumber%/,)$if($gt(%totaldiscs%,1),%discnumber%-,)$if($ne(%albumartist%,),$num(%tracknumber%,2) ,)- $if($eq(%albumartist%,Various Artists),%artist% - %title%,%title%)

1 Like

That’s very nice. I see you shortened the file path a little bit.

1 Like

That was SO useful, thank you! And Picard is just amazing…

Small remark: there is no need for the album artist to be in the folder name of the album folder.
It is just redundant and lengthens the path name.

As long as your embedded metatags are in order, there are no negative side effects if you omit it.

Thanks Otto. That is a good thing to know. I can’t trust my meta tags. My family uses the computer and they add music that has some messed up tagging. After a lot of trial and error. I found that this folder structure helps Plex alot. And I get better results.

I have this folder structure as a sort of safety plan for me. If I could trust my tags I wouldn’t need

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.