Date of Music Album field 'Originally Available' is set to most recent year found

Hi,

I like Plex a lot but there is one thing that I find very frustrating:
When Plex scans my Premium Music library, it totally messes up the ‘Originally Available’ Date field, which I (try to) use to organize albums per artist.
It should be set to the first time an album came out (otherwise, it should really get another label) but in a lot of cases, it simply is not.
There are other issues with Plex finding the right match for albums or artists but if the tracks are well-organized, well-tagged rock or pop music, you get a great looking library in return … except that the ‘Originally Available’ dates are mostly wrong, especially for music that came out before the CD arrived!
I honestly don’t care that Pink Floyd’s first album ‘The Piper at the Gates of Dawn’ came out on CD in 1994. I want it to show up when it was originally recorded: 1967!
I can understand that Plex can’t always find it online or uses a newer release because Last.fm or MusicBrainz or whatever returned that but if I set it myself in the ID3 tag and I check ‘Use Embedded Tags’ and I set ‘Local Media Assets (Albums)’ as top priority, it should simply use what is found in my tag. Unfortunately, it gets overruled most of the time. So ‘The Piper at the Gates of Dawn’ shows up somewhere in the 90s.
I’ve searched the forum to see if others have similar problems: check.
I have well organized my music: check.
I have the latest version of the server: check. Updated this morning.
I tried several ID version tags: ID3v1, v2.3, v2.4.
I Plex danced so many times I got sick of it.
Plex keeps saying that Pink Floyd’s first album was originally available in 1994.

Than I found out this:

If I remove the metadata match in the menu, the date shows up just fine!

Before unmatch

After unmatch

That means, the ID3 tag for recording time is correctly read from the local file.
If I try to fix the match, the date changes again. Bizar, as the selected match had the correct year.
This means the PlexMusic Agent messes it up. It shouldn’t.
As I couldn’t find much response online, I started going through some code bundles myself: Scanners.bundle, LocalMedia.bundle, PlexMusic.bundle, LastFM.bundle.
I’m not a Python expert but I’ve written a few scripts myself before.

That’s when I found following piece of code in the LocalMedia.bundle file ‘audiohelpers.py’:

# Release Date (original_available_at)
metadata.originally_available_at = parse_datefield_select_highest(tags, 'TDRC', metadata.originally_available_at)

That’s not the right way to go:
You should go for the lowest (=oldest) date, not the highest (=most recent)! We’re trying to set ‘originally’ available, no?
By ignoring older dates, the ‘local’ asset (=id3 tag) is overruled if the ‘online’ source (plex music agent) has allready set the field for the album to something more recent.
And it does that a lot for old albums!
It’s no use setting the ‘Local Media Assets’ on top if the PlexMusic scanner came up with a more recent release of the album.

That’s when I tried this simple trick in the method ‘parse_datefield_select_highest’ of ‘audiohelpers.py’:
I switched the higher_then into lower_then when an incoming date is compared with what is allready set in the medata so the oldest date is selected instead of the newest:

Get newest date

def parse_datefield_select_highest(tags, tagname, metadata_field):
    ...
    elif (available > metadata_field):
        return available
    ...

Get oldest date

def parse_datefield_select_highest(tags, tagname, metadata_field):
    ...
    elif (available < metadata_field):
        return available
    ...

I refreshed my album’s metadata and suddenly the sun came up: The Piper at the Gates of Dawn appeared to be released in 1967.
I refreshed my whole Pink Floyd set of albums and the years of original recording started tumbling down to what they should have been in the first place (i.e. the values as set in my local tags, unless gracenotes or lastfm found something older. If so, that’s fine by me. I want the oldest=original release!)
I didn’t even have to Plex Dance!
I refreshed my whole library and guess what: it’s looking great now :slight_smile:

To make a long story short

Can you Plex Guys please take into consideration fixing the code to go for the oldest release_date found in the LocalMedia.bundle (audiohelpers.py)?
It’s a change of 1 character in the code but man, what a change in my music library!
See the screenshots for my Pink Floyd collection before and after.
I’m sure others will benefit from that small change (you probably should also rename the method to …_oldest :slight_smile:

Pink Floyd before fix

Pink Floyd after fix

Kind regards,

Fred

I’d really like to be able to sort my albums by original release date!

I’d also appreciate this

This is really a bug report, not a feature suggestion - perhaps it hasn’t been seen by the devs. @OttoKerner should this be moved to another subforum?

Thanks for the info Fred_rik, I had noticed the same issue and had started a similar post, but yours has way more info.

It would be great if this is fixed because I agree that the original year should be used on releases.

Hopefully this will be fixed soon.

Back when this thread was opened, Plex used Gracenote. Without embedded metadata, Gracenote used the date of the most recent “re-release” of a particular album.
This is what is being criticized in the first post above.

The new music implementation is now working differently.
Without ‘prefer local metadata’ activated, it tries to fetch the ‘original’ date when an album was released the first time, from MusicBrainz.org
If ‘prefer local metadata’ is activated, it uses whatever is in the date/year metatag.

So I’d say we can close this thread because it has been superseded by newer developments.

Re-releases and special editions released in the 2000’ show up as new albums when I’d like them to show up when they originally came out in the 50’s, 60’s and 70’s

My entire collection has been tagged and renamed with Picard, so all the metadata is theoretically immaculate, I would like to choose for Plex to sort by the “Original Release date” tag and not by “Date” tag instead of relying on the cloud to figure it out for me.

Seems more like a bug if Plex pulls cloud music metadata from one tag and local meta data from a different tag (especially considering BOTH are tagged by musicbrainz).

AFAIK Picard is tagging the files with the release date of the ‘version’ of the album. Additionally, it uses the special meta tag ‘Original Release’.
This one, however, is not read by Plex yet.

So, if you have enabled ‘prefer local metadata’ and you have prepared your files with Picard, then you will only get the regular ‘release date’ and not the ‘original release date’.

Right. I consider that a bug

Time to change the Plex Music scanner to read the TORY (Original Release Year) tag in local files then (id3v2.3), and if that’s empty, assume it’s the same year as in the TDAT field.

1 Like

I agree

I hope this gets fixed soon because it is really annoying when browsing for music from specific years or playing the time travel radio.

Hey @OttoKerner @leelynds

We’ve talked about the metadata on albums before, but I’ve noticed that the Foo Fighters 1995 debut keeps going to 2003 on release date when I match the album in Plex. I’ve tried metadata from Picard with no luck and then removing all the unnecessary metadata with Kid3 and just keeping the essential, but still it goes to 2003.

Currently I’ve got the album unmatched, that’s the only way I can get it show up with the correct year.

Any tips on what I can do to have it matched with the correct year?

I have to say that the situation improved considerably, since I converted my library to the new music code.
Musicbrainz has listed several versions for most albums. And the new code prefers the original release date by default.

If you still don’t get original relase dates for your albums, I’d go and verify that Plex is actually using the new code to match these releases:

Edit your music library,
go to the ‘Advanced’ tab and verify that both Scanner and Agent are set to “Plex Music”.
Then go to the “Foo Fighters” album artist and ‘Refresh Metadata’ for the whole artist.
Then let it sit and wait for several minutes.

Afterwards, call up the Plex XML info for one track of an album which still has not the correct release date.
Please copy the values of the guid, parentGuidand grandParentGuid into here.

Do also take note whether the checkbox ‘Prefer Local Metadata’ is activated or not. (also in the properties of your music library, on the ‘Advanced’ tab).

1 Like

Hey @OttoKerner

Thanks you for your response and sorry for the delay, I didn’t receive a notification saying I’d got a reply.

Ok, so I double checked the scanner and agent, but they were already on “Plex Music”. I refreshed metadata for the whole artist too, but the album still comes up with 2003 when matched.

Here’s the XML info as requested

guid=“plex://track/5d07cd91403c640290f1a25e” parentGuid=“plex://album/5d07c171403c640290845cfa” grandparentGuid="plex://artist/5d07bbfc403c6402904a5e1e"

Prefer local metadata is also active. I know the version of the album is a re-release that came out in 2003 and it was tagged with MusicBrainz, but even when I got rid of the extra metadata is still came up with 2003.

Which means that a “date” or “year” meta tag which is embedded in your files will override the date that comes from musicbrainz.org.
I have looked up the album with that ID plex://album/5d07c171403c640290845cfa” and it returns originallyAvailableAt="1995-06-26T00:00:00Z" year="1995"
So the “2003” must come from your files.

Hey @OttoKerner

Ok, that’s good to know. I will strip the album right back and start again.

Thanks alot for checking this out for me, much appreciated.

Hey @OttoKerner

Ok, I’ve stripped back the metadata on the album, only added the basics and it’s still coming up as 2003 on the year. Please see the images below

I don’t get why it’s doing this. Even the Fix match shows up as 1995

Maybe the Plex Dance is required.

I know the new music system was supposed to eliminate the need for it, but I had a couple of albums that the only cure was the dancing routine. I believe you can leave out step 4 in music libraries.

1 Like

Hey @leelynds

I tried the plex dance again, removing all of the Foo Fighters files I had as well as optimising the database and it worked. It took a while as there were a lot of files, but it’s nice to finally see the album come up with the correct year, haha.

I won’t be using MusicBrainz for my tagging anymore as it’s not worth the hassle.

Thanks to you and @OttoKerner for your patience.

1 Like