For the last few days, my Plex Server has been sorting TV Shows - By Last Episode Date Added incorrectly. If I use “Episodes by Date Added” or “Episodes by Air Date” sorting is correct.
File dates/times have not changed. I’ve checked the database and in media_items they all have the correct created_at and updated_at dates. Server is latest Plex Pass Beta version (plexmediaserver_1.11.1.4760-58bcb2957_amd64.deb) running under Ubuntu 16.04.3 LTS. Server has 64GB RAM and dual 6-core Xeons.
The only thing that has changed is that recently I remove a couple of directories from the TV Shows library and moved them into their own library (separating out anime). I’ve rescanned the entire database, optimized, emptied trash, cleaned bundles, etc.
I’m currently running Version 1.11.3.4803 on Windows. It seems to have happened within the past few server updates. “By Last Episode Date Added” displayd the same ordering as “Date Added”. This is in TV Show view. When switching to “Episodes” view and then switching to list view and sorting by “Date Added”, the list of episodes is correct, so this problem seems to be limited to “TV Show” view sorted by “By Last Episode Date Added”.
Devs - if you want me to go back and try to determine what server version this changed in I will (reluctantly) do so to get the problem solved…
I tried a bunch of things – but none of them worked. I had feared the problem was self-induced as a result of my (successful) attempts to add shared playlists to my servers. I ruled that out as the issue though by reverting to previous database.
I think the problem stems from having items in your database with dates which are outside the normal range (eg. files with dates from the year 2100). That said, the updates magically fixed it before I delved too deeply into that. I also surmise this was the issue from the release notes on the updates which fixed it – as those items were the only fixes on the list that seemed like they could have relevance.
I was about to embark down the road of check the database, do you know what tables and fields I should be looking into?
It would be nice if there was a way for me to check and/or correct issues in the database by using the user interface instead of manually editing the database to fix this.
I opened the database and looked in the metadata_items table and sorted by the added_at column and the database looks right there, but I don’t know if I’m looking at the correct information.
I thought of something else that may be relevant. I migrated my plex server from one machine to another a few months ago. Both machines were at the same plex server version prior to the copy. But I did copy the localappdata folders and files from one machine to the new machine, as outlined in the migration FAQ.
I’m not sure what I’m looking for. I wanted to try to recreate your issue so I could see the mismatch, then I can check the dates to make sure they match. If you zip the file, it should be much smaller.