After changing the TV ordering plex://season dashboard gets all messed up

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 …

… with the plex://season/xxxxxxxxxxxxxxxxxxx

Other points of interest:

  • Clicking on any item in the list still brings you to the correct episode so the linkage still all works.
  • Doing a FULL plex dance of the series does not help. Also, doing empty trash, optimise db etc… has no effect.
  • Changing the episode ordering back to TVDB (Aired) does not fix the issue.
  • Plexdash will not load the show at all. It just spins and spins and spins.
  • I’m not the only person to see this as its also reported on reddit → Reddit - Dive into anything

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.

1 Like

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.

This is evidenced in the picture below.

1 Like

Okay, I see the problem.

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.

Anyhow, I’ll manually fix-up my db myself and add this to the list of stuff I regularly check in my database.

1 Like

Just to confirm, manual fix-up of the records within the metadata_items_views did correct the 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.

FYI… another user has also reported this behaviour over on reddit → Reddit - Dive into anything

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 :wink:

1 Like

Hi all. Thanks for bringing this to our attention. I’ve raised this internally with the right people, and will update you here as I learn more!

1 Like

We’ve identified the issue and resolved it. The fix will be available in a future server release. Thanks again for letting us know!

2 Likes

Thanks. I assume the fix stops the issue from happen but does it also retrospectively fix any records which now have incorrect data ?

1 Like

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

Screenshot from 2024-05-04 09-42-47

@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?

The fix includes a migration to repair instances where this has already occurred.

2 Likes

I can confirm version 1.40.3.8502 has resolved this problem including the migration to repair existing history entries.

2 Likes

OK, I just updated to Version 1.40.3.8555, and it broke my history even more…

Pre-update: I had two TV Shows that had a lot of entries with plex://... that did not correlate to any watch history in that show.

Post-update: The entries are all still there, and now refer to that very show they’re in.

For example, one of those shows was released in early 2024, and has watch history entries going all the way back to 2021…

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.