New user Q - scripting for Plex - date sorting, and empty dates

Hi folks. I’ve been wading into Picard for the first time, and have the very standard script you see below. My goal is to “unify” metadata and sorting of an already pretty tidy collection of music albums, for use in Plex. I have a couple of questions based on my script:

  1. For an unreleased album or demo, or anything that otherwise doesn’t really have a date (which is rare for my collection of mostly classic rock albums), how does Plex handle that? My script handles an empty date just fine, I’m just wondering what the knock on effect will be in Plex. Is there a benefit to forcing in 0000 as a date? Which leads me to my other Q…

  2. My current script moves the bracketed date to the front, so my albums sort in a tidy way from older to newer on my Mac. I figure if I’m going to date the albums, it might as well be usable outside of Plex too. Is that common with folks here? Is there any downside to putting the date first? For Movies and TV, Plex often puts the date at the end, but Music seems a different beast.

Thanks, more questions incoming surely :slight_smile:

$if2(%albumartist%,%artist%)/ $if(%originaldate%, \($left(%originaldate%,4)\),%originaldate%) $if($ne(%albumartist%,),%album%)/$if($gt(%totaldiscs%,1),%discnumber%)$num(%tracknumber%,2) - %title%

Hi! I use Plex with the default MusicBrainz Picard settings, which is what Plex expects anyway. With a few nice tweaks/additions (of course!), but nothing that really changes the file structure.

FWIW Plex seems to handle this just fine, which I think is what you’re wanting to do:

Becomes this in Plex:

Obscure Band so Plex butchers the cover art and the artist bio, but nothing is broken afaik :slight_smile:

If you have more questions specifically about Plex behaviour (rather than Picard scripts etc) you may get better answers in a Plex forum.

1 Like

Thanks I actually did post to the Plex and Plexamp Reddit and got some chatter going about it just now. You can have a look there, as there are cases both for and against including the date and how that might impact Plex:

So far, one person feels strongly that including the date in the album folder name may mess up matching – to which I wondered if solid metadata would trump that. Someone else thought including the date isn’t that big a deal.

At this stage, for me, I think the tidy folder level sorting outweighs losing a few matches, especially if I’m about to get updated and pretty complete metadata from Picard. but I can certainly test with and without the date.

We’ll see if anyone else weighs in. Hopefully I don’t start too much of a squabble over an honest and valid question. :laughing:

I’m still keen on knowing whether I should leave some with empty dates, or plug in 0000 or something similar. Sounds like either way will work in Plex, and they’d of course sort together outside Plex too.

I’m a KODI user which is where Plex came from. I thought the point was the tags over-rule filenames. Videos use filenames, Audio uses tags.

I know KODI has gone a few steps further and now look specifically for MBIDs, but don’t think that Plex went that route. (Don’t know)

Easy way to test. Make a folder called “Kylie” and in there put a folder called “Fever” and then add inside a totally different album that is properly tagged. If it works like KODI then the tags will over-rule the file and folder names.

And while testing, also find out what happens with compilations.

Not sure I’d have many compilations, but yeah that’s a valid test to do in terms of a typical album.

I went with the folders Billy Joel and his album Glass Houses… but inside that were the post-Picard tidied up tracks for The Breeders album Last Splash. This is the only thing in Plex Music at this time.

And Plex lists it as… The Breeders, and the album Last Splash.

So that test would suggest that if the artist name and/or album name are wildly incorrect… Plex uses metadata from the files to correct those.

Well Plex doesn’t correct back to the original folders of course, just in its own presentation of them.

Therefore dropping a (date) in the album folder name shouldn’t play a role at all – at least not for a standard single-artist album. That (date) would just not appear in the same manner in Plex.

The logic says to me that it will only look at file names if there is no metadata. The more metadata you fill in, the better the quality of Plex data.

There should be a list somewhere of the minimal tags that Plex uses to fill in the database. I assume there is some kinda FAQ or Wiki?

With KODI the tags are read first. And the MBID is used to get extra details. I know the tag is the priority as I often rename my album titles as I sometimes own multiple versions of an album. i.e. a (deluxe edition)

With KODI the MBID is also used to separate versions of an album with the same name.

As someone said in one of the Reddit threads, in my particular case (of having new and solid Picard data before importing to Plex), it sounds like I should be just fine. Perhaps more so if we are talking standard (and complete) albums, and not anything too wacky. Therefore the tradeoff of having a nice folder structure on my drive is worth it.

If it comes down to it, it’s easy to lop off the date in a quick batch folder name process, then rebuild my Plex library or just rescan it.

I’d be keen to check out your naming script, if you want to share it. It’s all new to me so the only bit I learned was how to add the date, then second guess that and move it to the front.

Thanks again.

That’s funny. I went looking for a list of minimal tags and found this:

I think I recognise that @Beckfield name :grin:

Yes I currently have, in Plex, prefer local metadata, embedded tags for genre, and local album art selected.


One thing I’m having an issue with spotting in Plex though, is why I’m not getting an artist image. See my Breeders pic above. Blank pic for the band.

I recall looking that up last night and see that forcing it by including a jpg named in a certain way should work… but is perhaps broken right now. Adding those by hand isn’t gonna kill me though. I recall mention that they come from, and I don’t currently have that cover provider selected due to how I finally got my cover art working well.

I’ll drop out now as I am out of my area being a KODI man. But that thread of @Beckfield’s did go on to talk artist art as well. Did you try an artist-poster.jpg in the Breeders folder? (and all them other ticks in the screen shots)

I am trying the Beetlejuice trick and seeing if I say @Beckfield’s name three times maybe they will appear? :grin:


Anyway, I can now get artist art in Plex after changing my album art preference from “local files only” to “both Plex Music and local files”. So it gets it form Plex as a fallback to local. Writing that option as “local files then Plex Music” would I suppose be more accurate.

I can’t get either folder.jpg or artist-poster.jpg as local files to work. It’s that stuff that I recall reading somewhere wasn’t working correctly right now.

Artist pictures from are likely the “Artist Bios” setting in the library settings, as it also loads Bios from I haven’t actually tested that however.

Huh? wha… uhh… Yeah, that’s me.
The Gif Library — It's showtime.

I switched from Plex to Emby a few months ago, after their (latest) little personal privacy invasion debacle (and since they have surpassed Plex with better support for classical music and multiple artists), so I’m not up on what may be broken now, but, yes, with the settings you mentioned, Plex should look for a local file first (folder.ext, poster.ext, artist-poster.ext, some others) in the artist folder. Failing that, it queries MusicBrainz. MB doesn’t store artist posters, but if the MB artist entry has a link to Last.FM, the image can be retrieved from there. Also, possibly, from Artist bios are supposed to come from (also via a MusicBrainz connection), but there may be some fallback to Last.FM.

At least, that’s how it was explained to me by Plex’s CTO.

I also wrote a proposed Help page regarding local image files. I think it’s pretty accurate, but I don’t know if they ever added it to their documentation.

EDIT: Looks like they did: Adding Local Lyrics and Artwork for Music files | Plex Support

1 Like

I was pretty involved in getting Plex to amp up their support for embedded tags a few years ago, around the time I wrote that HowTo that Ivan linked. Since they did that, I’ve found that Plex is pretty uncaring about your file name as long as the embedded tags are in excellent shape. But I never tried adding the date or year to a music folder/filename – that was never in my schema.

Plex won’t commit to saying the folder/filename structure isn’t important if your tags are good, and I don’t blame them without a lot of testing.

Many thanks for weighing in on this.

And congrats on the upcoming Beetlejuice sequel.

1 Like

Messing with folders definitely can mess up Plex matching. And messing with folders and then having trouble might be one of the #1 problems that users ask about in Plex channels/chat, so it’s a natural reflex to tell people to just leave the defaults alone.

But, in this case, moving the date doesn’t hurt afaik.

By the way, if you are tagging with Picard/MBID’s, remember not to worry too much. It is a piece of cake to change your whole library folder structure again any time, once you have tagged it once :slight_smile: