Server Version#: Version 1.40.2.8395
Player Version#: Version 4.128.1
Firstly, this is a new bug as I’ve changed episode ordering on shows in the past and never experienced this issue.
Steps to Reproduce:
Lets use Friends as an example. Add the show, set the episode order to TVDB (Aired) and watch some episodes / seasons. For me I have seasons 1-8 watched with seasons 9-10 unwatched.
Now, re-order the episodes and switch the episode ordering to TMDB and force refresh the metadata.
Issue:
Have a look at the dashboard play history and it will look like this …
My guess is the plex://season id is not being resolved correctly somewhere. Looking in metadata_item_views I only see plex://show/xx and plex://episode/xx so maybe the fact this is not stored in the history record is a factor. However, that is pure speculation on my part.
I can confirm I also have this issue (I am the redditor who posted the linked thread). I watched 2 episodes of “Deadwood” and then changed the episode ordering from library default to TVDB (DVD order).
I believe this action messed up the title in the play history as the OP suggested.
Interestingly enough, while trying methods to sort out this naming issue, I used the “Fix match” option in the Plex Dash app on Deadwood and after choosing Deadwood as a match option all of the histories for the show changed to the glitched title.
In the db under the metadata_items_views table the grandparent_title and grandparent_guid have been messed up.
As an example: grandparent_title should have Friends but instead has plex://season/xx and grandparent_guid should have plex://show/xx but instead as the season title Season 8.
I can manually fix these up now myself now that I know what the problem is. However, looking in my db I have one other show with this problem The Haunting of Bly Manor which I have not changed the episode order so it might be a wider problem.
For reference, I had three shows with this problem. Friends was the one I manually changed the episode ordering however two other shows also had this problem Marvel's Inhumans and The Haunting of Bly Manor both of which use the default library episode ordering.
Thanks for the mention @anon5074910 , that last one you linked would be me.
I personally did not change any ordering (e.g. TVDB / TMDB). I just created different subfolders in my library and moved shows into the subfolder. First all shows disappeared, then reappeared, with the watch history mixed up.
Contrary to the above, I can also not click on a misplaced play history entry of show A and it opens show B.
For me, I have one show that has basically accumulated half or more of my play history. All the plex://season/xxx entries have exactly the same xxx-key.
Could you provide a little more detail about the steps you manually took in the DB please? Where is the DB, how do I open it (is it sqlite?), what are the relevant tables and how do I find the right foreign keys?
Cheers
Edit: I found the location of the SQLite DB. I tried to restore a DB backup (rename the two -2024-04-24 backups), but then the Plex server wouldn’t even start. Starting to explore the schema a bit, but having a hard time understanding it.
Yeah, there is certainly something funky happening. I see a post on another thread that development where at some conference last week so hopefully someone from the team next week can take a look at this as I suspect we are the tip of the iceberg and only the few who have noticed this so far. Changing the episode ordering seams to force this issue however as I mentioned above I had other shows which used the default episode ordering and had this problem.
Regarding, manually fix-up – it does require direct edits to the db. If your happy and comfortable doing that then I’ll include some steps below. However, if your not then maybe just wait for development to come back to this thread.
Anyhow as I’m on linux I’ll use that as reference. Database is located /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-in Support/Databases/com.plexapp.plugins.library.db. I typically stop plex, copy the db to some temp location (taking a backup as well), do whatever I want do and then copy back when I’m happy before starting plex again.
The metadata_items_views table is the one that has the dashboard play history and the one with this problem. The fields grandparent_title and grandparent_guid have been messed up in some records. You can use sqlitebrowser to view the db information however I typically use the bundled sqlite "/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db that comes with plex to do any edits.
Getting the correct values, well grandparent_title is easy, that is the title of the show. For grandparent_guid its a little more complicated as that is the plex id for the show. You can get that via going into any episode on a show in the webux client, selecting the three dots (…), then get info and finally view xml. In here you want grandparentGuid which will be something like grandparentGuid="plex://show/606ee676cc0fca002d430dcc" This is the correct value.
Again, major disclaimer: If your not comfortable stay away and hopefully wait for plex dev to fix this. Also, BACKUPS is your friend if you decide to manually fix this yourself.
Thank you very much. I’ll wait a few days first, and see whether the developers will respond to this thread. In the meantime I’ll read-only have a look at the DB a bit myself, just out of curiosity.
And, yes, after today, I have added my Plex volume to my automatic backups
I hope a fix comes for this soon. I’ve had more shows effected this by and its a right pain in the ar$e having to manually fix this up. I’m guessing one of the nightly butler tasks is causing these to change …
Also… its not only TV show/episodes effected by this. I’ve started to have music tracks show this bug. See an example of a play history from Taylor Swift with the plex://album/xx
@aubrey.wodonga would you be able to confirm whether or not the upcoming release will fix existing records, or whether manual intervention via SQL tools is still required if I want to recover my play history?