Album sort order broken in PMS 1.14.0.5468 - **STILL BROKEN**

Original Exchange

@“Neil - Admin” said:
Windows update 1.4.1 fix, ‘The default sort order for albums was alphabetical (#6255)’ appears to have broken the Advance Server Setting, AlbumSort=“originallyAvailableAt:asc”. Is there any way of restoring this?

@OttoKerner said:
Album sort is now selectable in the GUI

  1. for each music library edit your library, go to the ‘Advanced’ tab

  2. the library sort oder can be overridden for any album artist by editing the artist

This thread was marked as Answered by the response just above by OttoKerner, but it was not to my satisfaction. Please read below my response to the original thread that I feel went largely unnoticed due to it being labeled as Answered and therefore overlooked.

My Response
The problem with this solution is that the options within the ‘Advanced’ tab mentioned by OttoKerner don’t offer the equivalent the registry edit mentioned by Neil-Admin, specifically the AlbumSort=“originallyAvailableAt:asc” mentioned in the original post. This references the ‘Originally Available’ field located under Edit Album → General (shown in 3rd photo below). When you pick the ‘Oldest first’ option in the Advanced tab as OttoKerner suggests either under a specific album or for the overall library, it puts the albums in order only by year, not taking month or day into account, then sorts alphabetically if there are more than one in the same year which puts albums out of order for many artists.

For example, the band KISS. Right off the bat you have their debut album ‘KISS’ and the follow-up ‘Hotter Than Hell’ which were both released in 1974. The self-titled album was released in February and the follow-up in October, but they are listed out of order because Plex is using the less detailed date reference using only the year, then the album’s name. This can be seen in the 1st photo below. As you can see by comparing the first and second photos this happens multiple times over KISS’ chronology.

As far as I know there should be no downfall to using the Originally Available field to sort albums as the date is always auto-filled with the matching year the album has in the upper-right of the web interface (though for some reason it always enters the day as Feb. 20th?) I never even bother to fill in additional month/day information unless I have this exact situation come up and with KISS it comes up at least 3 separate times making their albums WAY out of order (1st photo) and they are not even close to the only artist I have this issue with. I have downgraded my Plex server until I find that this is resolved or handled in a better way that always keeps my albums in order. (Downgrade with corrected sort order in 2nd photo using registry key as sorting mechanism with the AlbumSort="originallyAvailableAt:asc registry edit as shown in the 4th photo)

The band KISS on the current Plex Media Server with the albums out of order after choosing the ‘Oldest First’ option.

Plex Media Server downgraded to 1.3.4 and the problem is fixed.

Please change Plex’s sorting behavior to use the below date reference to sort albums chronologically.

This is the Registry Edit that Previously Sorted Albums Correctly When Detailed Date Information Was Given

This behaviour has been filed as a bug.

Oh thank goodness.

My OCD to always have the newest server version is fighting my OCD to have my albums in order. :smiley:

142 days later and no indication of fixing this. It may be more of a pain than I am imagining in my head, but it was just so perfect before and now it is not. :frowning:

This is long fixed for me.
The hidden preference is no longer used, however.

Now you have the ability to set a default sorting order for the whole library
and you can override this for every AlbumArtist individually (Various Artists for instance or classical music.)

Just edit your library in the user interface. Go to the tab ‘Advanced’

Or edit the AlbumArtist respectively.

@OttoKerner
I am familiar with all the new features and have tried to use them, but to no avail whatsoever. My KISS albums (which I’ve been using as the test) are still out of order as it only takes the year into account, but neither the month nor day so that albums released in the same year continue to be out of order since they get listed alphabetically second and the month and day fields are not taken into account at all. Something else may be screwy with KISS artist info in my database because if I edit that artist’s advanced properties specifically and I choose either Oldest or Newst first it gives me the exact same order of oldest first by year only then by name if there are two albums within the same year, but sort By name seems to work correctly. I suppose I could remove the artist from my Music library and re-add it to see if that resolves anything. I just hate to do that if I’m going to lose a bunch of manually input information that I would have to enter again. :frowning:

As a test of a different artist with multiple releases in the same year I just now added day and month information to the first few albums in my Beatles library and after doing so it does not adjust the order to reflect my changes.The first instance of this is:

A Hard Day’s Night - released on 7/10/1964 should be before Beatles For Sale released on 12/4/1964, but ‘B’ comes before ‘H’ (ignoring the A of A Hard Day’s Night) so that’s how it is ordering them and ignoring my manually entered day and month information in the ‘Originally Available’ field.

On another interesting note that has two parts, both of which may be old information, but shows the system can sort correctly by this field is.

  1. When I go into the initial view of my main music library and I change the view from Artists to Albums then to order by Release Date it does correctly show albums in the proper order with month, day and year all being properly displayed and sorted by. I just checked my Beatles and KISS albums in this view and they are all sorted perfectly using the full date, but this does NOT persist when I enter a specific artist’s page and set either the whole library or the specific artist to have it’s Album sorting as ‘Oldest First’. Albums are listed by year, then alphabetically in the case of multiple albums in the same year leaving me to deduce that the day and month are being completely ignored.

  2. The other thing I’ve noticed before and may have already mentioned in another thread is that whenever an album is added to Plex it grabs the correct release date year, but then fills in the ‘Originally Available’ field with the current month and day. For example, I added Train’s new album ‘a girl a bottle a boat’ on July 4th 2017 after having just seen their live show the night before and Plex set the release date to July 4th, 2017 and I had to look it up and manually change it to the correct date which was January 27th, 2017. Also considering this sort by is called Release Date, for consistency sake I really do think that the Originally Available field in the Album properties should be changed to Release Date so they will match since it seems to be pulling information from that field.

This isn’t a HUGE problem because if I notice an artist needs more discrete information filled in due to multiple albums in the same year I will enter it myself, but this definitely messes up the sort by Release Date list since Plex is always inputting the wrong month and day EVERY single time.

I know in a previous post I had stated I was staying reverted to an older version of Plex Media Server so my albums would stay in order, but that stand I took fell to the wayside quite some time ago for reasons I don’t recall. I am currently running PMS 1.7.6.4058 and have been regularly updating for at least the last 3 months. I have never witnessed this incorrect sorting behavior ever getting resolved.

Edit: I think I may have just found a smoking gun! Look at the attached picture. This is the 2009 Remaster of Magical Mystery Tour. I noticed prior to editing / updating the Originally Available field that Plex filled in when it automatically scanned and identified the album. It correctly set the date as a 2009 release, but the date on the page itself DOES NOT MATCH. It shows the original release date of the original album in 1967 which clearly proves that there are two completely independent fields at play here and Plex is currently sorting albums on the artist page with (in my opinion) the less accurate and wrong date field to sort by not only because it is less accurate, but is not obviously editable though it does seem to get updated when you change the Originally Available field, but it still remains the less accurate of the two and is what Plex is preferring.

Are you using a ‘premium’ music library or a conventional one?
a) If you are using a non-premium library, which Agent is set to be the default one in the properties of thew library (‘Advanced’ tab)?
b1) If you are using a ‘Premium’ library, is the checkbox ‘use embedded metatags’ checked (same place)
b2) Are ‘Local Media Assets’ on top or at the bottom under Settings - Server - Agents - Albums - Premium Music ?

Do you have several copies of the same album?

Have you installed modified or 3rd party metadata agents?

An experiment:
copy a few albums of the same AlbumArtist into a competely separate folder
Make sure your file names and embedded meta tags are correct and complete, so you won’t need to manually edit metadata
Create a completely new library and point it to this folder.
What happens? (Leave it plenty of time to crunch though, please.)

@OttoKerner said:
Are you using a ‘premium’ music library or a conventional one?

Premium (Lifetime Plex Subscriber)

a) If you are using a non-premium library, which Agent is set to be the default one in the properties of the library (‘Advanced’ tab)?

Even though I am using a premium library I do have the Local Media Assets listed first under both Artists and Albums, then Plex Premium Music. It has been some time ago - not long after Premium libraries became available to Plex Pass users, but I felt like Gracenote kept auto-filling in too much inaccurate information or would mismatch albums far too often and trying to manually fight against it became more of a chore than it was being helpful to me. They are undoubtedly a great resource, but it just wasn’t cutting it for my perfectionism unfortunately.

b1) If you are using a ‘Premium’ library, is the checkbox ‘use embedded metatags’ checked (same place)

Yes

b2) Are ‘Local Media Assets’ on top or at the bottom under Settings - Server - Agents - Albums - Premium Music ?

Top

Do you have several copies of the same album?

Not typically, but occasionally. Like in the Beatles instance I have the 2009 remaster set that comes with both Stereo and Mono mixes of several albums and I have them broken out to be separated discretely for each version. I wouldn’t say that is a super common occurrence across my library though. I do use a lot of symbolic links to make “copies” of certain Artist folders in my wife’s separate music library which will make it appear as though there are duplicates sometimes when I first add an album it will show up twice in the ‘Recently Added Music’ section of the main page, but that’s the only other occurrence of duplicates I can think of. I can say though the two artists I’ve been using in this example, KISS and The Beatles, are not being symlink’d to my wife’s music library.

Have you installed modified or 3rd party metadata agents?

I have not other than for TV shows I have one called TheTVDBdvdorder to fix certain shows such as Firefly.

An experiment:
copy a few albums of the same AlbumArtist into a competely separate folder
Make sure your file names and embedded meta tags are correct and complete, so you won’t need to manually edit metadata
Create a completely new library and point it to this folder.
What happens? (Leave it plenty of time to crunch though, please.)

What happens? Well lots of things. Mostly bad album art. :slight_smile:

Seriously though … I used my full KISS and The Beatles again since they’ve been good test subjects that released lots of material in short spans of time and my catalog of both is substantial.

The Beatles
I did find that on Rubber Soul and Magical Mystery Tour I had the 2009 Stereo Remasters labeled wrong in their tags as 2009 even though I wanted the original release date of 1965 and 1967 respectively. I fixed this and it ordered them as such. It is still odd to me how the situation above occurred where you have a field that I haven’t edited (or it would be orange I presume if I had) showing a different year than up at the top under the album title.

However, as stated in my previous post all albums show they were Originally Available on xxxx-07-26 (today) where the year is the correct year from my metadata. So the albums are not in order just as before being listed alphabetically within the same release year. I have edited the month and day fields on A Hard Day’s Night and Beatles For Sale and they remain out of order chronologically just as they were in my main music library.

KISS
Interestingly Gene Simmons’ solo album from 1978 has no year at all even though I double-checked my tags and when I try to Fix Match it finds it, but again with no year. Easily fixed, but odd. Beyond that, the behavior is exactly the same. All albums have the right year, but the day and month is listed as 7/26 and if I change the date and month to what they should be I would then expect that they should re-arrange chronologically, but they do not. I have included a picture of KISS where I have edited the day and month for the first two albums ‘KISS’ and ‘Hotter Than Hell’ to be 2/18 and 10/22 respectively, but they stay out of order preferring alphabetical sorting to month/day. After entering the day and month info I refreshed the library, came in and out of the artist’s page and even shut down and rebooted my system with PMS installed and the issue persisted.

I am not asking for it back as I’m sure this issue can be remedied, but before the old registry tweak was abandoned this issue was non-existent. The year, month, and day were always properly taken into account.

I also just realized that in both artists’ libraries if I go to the Advanced section for each and pick either Newest first or Oldest first it only does oldest first and never changes to newest first. Sort by name does immediately shift the albums around into alphabetical order. In fact, Library default is screwed up to… not sure how to describe in text form. Basically whatever the last setting that actually took, either oldest first or by name since those are the only two that registers - then becomes what it considers to be the library default whether it is or not. So if I pick by Name, then Library Default it stays by Name and not oldest first which is the actual Library default. Then if I pick Newest first it sorts them by oldest first. Stranger yet, when I make by name the default all choices seem to work correctly except for Newest first which now just sorts by name. Someone definitely needs to look into that section of PMS … it is super screwed up (that’s a technical term) / inconsistent.

I have included screenshots of the two KISS albums’ details mentioned above showing the dates entered and what the artist page looks like after having entered that information.



One other thing I just don’t understand and would seem to remedy the problem is why are the dates ONLY the year as shown in my pic above, but when I look at All Albums by Release Date it shows the ENTIRE date? Why the discrepancy?

Notice how they are all labeled July 26th in this new library except for the very few I changed to verify they would not re-order correctly after inputting correct month and day on the artist page - but they do here showing complete information and being in order! Why not make it this way on the artist pages as well?

Are you using mp3 files or something else?

I am not sure if the business with all your symlinks isn’t screwing something up.

How old is your plex data folder? Could it be that there is something screwed up in the ‘metadata combination’ config folder, stemming from a very old version of Plex?

When you have several editions of the same album, does the embedded AlbumTitle tag have already a disctinctive content? like e.g. Sgt. Pepper [mono] and Sgt. Pepper [RM 2009]
And are these then stored in separate ‘Album’ folders on disk?

@OttoKerner said:
Are you using mp3 files or something else?

My music library is 99.9% FLAC. Mp3 is so pedestrian these days. :wink: And in my 2 artist test library that was 100% FLAC

I am not sure if the business with all your symlinks isn’t **** something up.

You think the symlinks could be jacking up which thing? They’ve always worked perfectly and I can assure you with 100% accuracy that the minute that Plex got rid of the registry tweak referenced in my very top post is the moment I started having all these album sorting problems unless you are referring to a different issue that would be caused by that. I did that some time ago (July 2015) long before the album sort problem materialized when I asked about it here in this post and I never experienced a problem from it:

forums.plex.tv/discussion/174540/feature-request-allow-linking-of-media-to-another-library-ies#latest

Also, I can assure you that there are no symbolic links that have ever gone on with either KISS or The Beatles as my wife is definitely not a KISS fan and she would actually probably like having The Beatles in her library, but I am a terrible person and haven’t done it. :wink: I do each artist individual at the artist folder and it looks like this:

mklink /D "M:\Wife's Music\<folder of artist name>" "M:\Main Music Folder\<folder of artist name>"

I feel 90+% confident If I were to revert back to PMS 1.3.4 that the artist album page sort order issue would be alleviated since I did just that more than once as PMS had updates in the hope the problem would be fixed, but at this point I would be concerned other things might possibly stop working or go awry if I were to revert back that far.

How old is your plex data folder? Could it be that there is something screwed up in the ‘metadata combination’ config folder, stemming from a very old version of Plex?

Oh good grief. I couldn’t even speculate on that one. It has been years. When I look through my Plex database folder the various folders the oldest date I can find on any file / folder is 10/23/2014. I’m pretty certain I’ve had Plex longer than that, but I may have had to start over / re-install for some reason at that time. I honestly do not recall. I’ve never intentionally gone in and erased it because I have so much custom / manually entered values I don’t want to lose. I love Plex A LOT, but 100% accurate all the time it is most certainly not - especially with music which is really Gracenote and not Plex itself I believe - and I really don’t want to lose all that as there would be NO way I could re-create it and in the words of The Rolling Stones that 'would make a grown man cry’. I do have a disk cloning software I use to backup all my various drives onto external backups which I could run my Music one and the one the Plex Database is living on and try whatever you would suggest in the desperate hope that if something got horribly spooged (that’s another technical term) I could easily restore it back either by my backups or Windows shadow copies which I would be less confident about probably.

When you have several editions of the same album, does the embedded AlbumTitle tag have already a distinctive content? like e.g. Sgt. Pepper [mono] and Sgt. Pepper [RM 2009]
And are these then stored in separate ‘Album’ folders on disk?

Yes, my tagging is unique. Here are the two versions of Magical Mystery Tour and how they are tagged as well as my folder structure.

I am not trying to be dense and I want to understand the path of logic your mind is taking, but I feel like I’m missing the correlation between my tagging and Plex not ordering albums correctly even when I have manually entered date and month values into it despite what my tagging may or may not be and it is still wrong. In your library do your artists’ pages show albums with the full month/day/year where mine is only showing the year there, but the full date in my all albums by release date view? I work on computers for a living as an IT consultant so I know problems can certainly be hard to nail down and / or the solution coming from somewhere that would seem to make absolutely no sense at all, but I’m curious what you might be thinking at this point or if you are just as confused as I am. I am definitely curious to know what your music library(ies) behavior might be (with a screenshot) if it is different than what I am experiencing and like I said I have backups that I can bring up to current and try anything you would like if you feel it would be beneficial from a troubleshooting standpoint. I certainly have entertained the idea of wiping the whole thing and starting over, but that always seemed a little extreme to me - sort of the whole throwing the baby out with the bathwater sort of a deal - and the way my problems presented themselves RIGHT when Plex changed where the server was pulling the ‘sort by’ date information from was the moment I started having things go out of order so I never felt like it was a database corruption / failure, but rather a poor implementation of that new method of the server component doing its organizing. Other problems have surfaced in this discussion, but that is my main concern as it creates a disorganization that I can’t resolve by any means available to me. Everything else, while a bit of a nuisance at times, is more or less correctable.

@cft76011 said:
In your library do your artists’ pages show albums with the full month/day/year where mine is only showing the year there, but the full date in my all albums by release date view?

The display in the UI is one thing.
The order of the albums is another.
Let’s keep the former out of the discussion for now.

I am definitely curious to know what your music library(ies) behavior might be (with a screenshot) if it is different than what I am experiencing

It is working as intended for me
As you know, “Please Please Me” was released 1963-03-22
and “With The Beatles” followed on 1963-11-22
W comes after P alphabetically
yet, “Please Please Me” appears last in my library, due to the sorting order being “Release date, descending”
Exactly as intended

With Flac files I am sure the full date can be read from the file.
I did embed the full date into my files, although my tagging software used the ‘year’ tag, not the ‘date’.
(I don’t remember anymore why, but it was a relatively recent change and there was a good reason for it.)

Have you checked your Plex Media Server.log file for messages about database corruption?
(You’ll have to restart Plex sever and let it run 1-2 minutes, only fetch logs after that)

Okay, so visually the dates appear the same and we aren’t talking about that and that’s fine, but my HUGE takeaway there is when you said

due to the sorting order being “Release date, descending”

I do not have that choice ANYWHERE within an artist page nor do I have ascending which would be my preference as noted in my original post. These are the only choices I have unless I am looking in the wrong place / am blind / stupid or D, all of the above.

These two pictures show the sort options available to me under the Advanced section for both the whole library of the Music Test folder I made for the purposes of this discussion as well as my options under the artist only which are the same. Amusingly you will notice that in the background of the larger picture that despite the option Newest first being the highlighted and current option the library is shown sorted by Name :neutral:


@cft76011 said:

due to the sorting order being “Release date, descending”
I do not have that choice ANYWHERE within an artist page nor do I have ascending

I wrote this from memory.
When I go into the properties of my music library, it is set to ‘newest first’, which aligns perfectly with my screen shots.
The only artist where I override the ‘library’ sorting order is ‘Various Artists’, the rest uses the library default.

Well pooper scoopers! (another technical term - I have several and a 3 year old now so they’ve gotten weird) I was hoping I’d caught something there that maybe my server was holding on to old filters for some reason. I got all excited.

Okay so server logs … boooo. I rebooted the entire machine for good measure and have waited a couple of minutes and here it is. It doesn’t look like anything particularly remarkable to speak of, but I’ll leave that for better minds to decide.

Is there a way to reset PMS components without wiping the database or in essence all of my manual changes. I’ve reinstalled the software before since this has happened and that hasn’t seemed to give me any relief, but this seems like an under the hood sort of problem and not the data itself. The data is correct, but it is being interpreted by the program incorrectly for who knows why? I hope?.. It’s so weird that it is perfect in one area of the server and wrong in another.

@cft76011 said:
Is there a way to reset PMS components without wiping the database or in essence all of my manual changes.

Yes, there is.
https://forums.plex.tv/discussion/comment/1473033/#Comment_1473033

Okay so server logs … boooo. I rebooted the entire machine for good measure and have waited a couple of minutes and here it is.

Sorry, I forgot to tell you to activate ‘debug’ logging before doing the restart.
Right now I see only an error complaining about your router not supporting NATPMP, but that is not critical. Particularly if you use manual port forwarding and your remote access is working.

Oh shoot. I had debugging on and I turned it off, but you just didn’t want verbose logging. My bad.

Thank you for that link - I have bookmarked it for later reference.

Yes, I am using manual port forwarding and it works great! No problems there thank goodness.

I probably already asked you this, so sorry for repeating:
Is drive letter V: a local drive?
Formatted to NTFS?
Excluded in your Anti Virus software from scans?

Remove the DVD order agent.bundle - its function is now integrated into the regular TheTVDB agent
Because of this its author also won’t update it anymore.

Use the opportunity to clean out any other plugin and channel you’re no longer using as well.

I don’t see any indications of database corruption in your log file.

You have not asked, but no worries really either way.
My drives are as follows:
(C:) is my system drive naturally and also where Plex the program is installed in the default location.
(D:) is a data drive for Windows folder redirection and my company documents - Plex really has no clue this drive even exists
(M:) is my Music drive
(V:) is my Video drive and also where I have Plex store it’s Database folder.

All of these drives are local within the system running Plex Media Server, but across my LAN the M and V drives are duplicated as mapped network shares.

All drives are NTFS

I am not running anti-virus software on my server computer as it is rarely if ever used to casually browse the Internet and not that I am by any means infallible, but I am in IT and typically know what to avoid. Like I always tell my clients, your #1 security vulnerability is your own user’s actions.

Do you want another log file once I perform those actions or do you have anything else you would like me to do?