Up until last week the show Spartacus and its special season Gods of the Arena was picked up correctly by plex using tmdb episode ordering matching all metadata, titles, summaries, rating, cast etc… as per tmdb.
However, this week after a metadata refresh all the episodes for this season are now unmatched by plex with all the data removed . Unmatching also changes the guid to a local id which also now means any watch history or view state for the episode is also gone! Grrrr…
It did not as the episode guid have changed so plex kinda sees them as a new episode. I guess this happens because they became unmatched and plex assigned a local guid when it happened.
However, I was able to manually fix these up within the metadata_item_settings and metadata_item_views tables.
My understanding on this (I’m asking around for clarity) is that your local history and states are stored by the ratingKey and Plex GUID. Anything synced to plex.tv would use the Plex GUID. The ratingKey should not be changed if simply unmatched. Unmatching a title then viewing the Watch History should result in the same data as when it was matched.
Since the the ratingKey shouldn’t change and the Plex GUID did not change, your watch history and states also should not have changed.
I assume that this Special was watched previously and the screenshot of the Special above is the proof that watch history/state was removed. Without another metadata source change it’ll be difficult to reproduce this. Regardless I’ve at least raised this with the server folks.
I did test around this as best as I could without a metadata source change. Let me know if you’ve got something else to try or I’ve missed something.
Setup:
Series with some episodes
1 episode in-progress
1 episode marked as watched
1 episode actually watched
Test:
Unmatch, refresh metadata, Fix Match back to original series
original Plex GUID → blank GUID → original Plex GUID
Fix Match to another series, refresh metadata, Fix Match back to original series
original Plex GUID → new Plex GUID → original Plex GUID
Dance away series and readd series
new ratingKey
Result:
While viewing the Series detail page the states and watch history never changed between any of the tests and their steps. Again, in my understanding, this is expected and shows resilience to handling the problem of metadata source changes.
Now, lets simulate a change by changing the episode ordering in plex to The Movie Database (Aired), which is a significantly different ordering than the DVD order. I have not renamed the files, only changed the order in plex. Force refresh the show at this point. The watch history etc… all remain. No problems so far however episodes 1x11 → 1x20 are unmatched.
Now, revert the change and set it back to TheTVDB (DVD). Force refresh again and boom, 5 episodes have switched from watched to unwatched.
I’m not sure why these episodes and not others. It appears somewhat random to me but there has to be come code logic behind it. I’ve seen this happen in past for some shows and not others which have had radical episode ordering changes.
Anyhow, this is kinda a side issue (at least for me) as I know how to fix this when it happens. What is beyond frustrating is the back-end metadata scrapper continuing to match ids, duplicating them for shows and then deleting valid metadata content due to how its being scored. This just should not happen and I’ve no real control to fix it on my plex server.
If I hadn’t figured out what happened by looking at the dup ids for the show and have the bad entry deleted at tmdb then plex would still be broken for this show using tmdb episode ordering.
The removal of watch history/state seemed like the more important issue initially. So returning to the “root” of the issue in the OP, I’ll split this out into it’s own issue for guidance. Can I assume the “solution” would be to allow for locking a title down to no longer receive changes? Or was there something else you had in mind? Just trying to gauge expectations.
Man… what did they do to The Animatrix… So it’s a Show but also a Movie with 9 Movies in it…
Maybe. However I suspect at least in this case its a situation where the bad dup id was added to the top of the list for this show in plex. So, tmdb://303022 was the new bad id and it was placed above the good id tmdb://46296. With the bad id being first plex uses it and ignores the second existing one which had all the good data.
I’d suggest, in situations where a second (or subsequent) ids are added they are incremented below any existing ids. This will mean at least any existing metadata would remain and wouldn’t be nuked by a duplicate ids being added. If cleanup is needed, it should happen organically by the community to remove the bad entry.
Plex seems to be defaulting to the newer one, which seems like a bad idea at least to me.