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
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
Pink Floyd before fix
Pink Floyd after fix
Kind regards,
Fred