On deck is broken from new server move

Also posted in General discussions (Plex Pass) - If this is bad, someone tell me

Pleassseee someone help! I have just moved from Windows to Freenas and decided to make a fresh new database (which I see now is a slight mistake, but I was advised that moving the whole folder structure over would be difficult due to the Windows registry storing settings, where linux/freebsd will use an XML…anyway). I have followed the link below to move over the viewstates;

support.plex.tv/articles/201154527-move-viewstate-ratings-from-one-install-to-another/

But this has only pulled across whether I have viewed the item or not. When I check On Deck, this is empty. If I go to a show, even though a lot are watched, the On Deck in the TV show doesn’t show either;

But will do for any unwatched;

If I then go and check the database, I can see that everything is matched up and for my account ID still. In that the generated guid is correct;

One weird thing, if I then watch the next item, everything sorts itself out, but with a shared server of around 10 people I need a blanket fix for this. I have ran sqldiff.exe to see what happens to the data when I watch something, but this has told me nothing, only that a metadata_item_settings record is created and also a metadata_item_views record, but the latter table can be dropped and on deck still shows; which tells me metadata_item_settings is the key!

I have probably hunted every post imaginable here and really need some help from someone who knows that slightly little bit more than me. Someone suggested that this is based on originally available, but all my TV Shows have a originally_available_at datetime as I use this for correcting my Recently added all the time (as to me it should be recently aired);

UPDATE metadata_items SET refreshed_at = NULL, added_at = originally_available_at, created_at = originally_available_at, updated_at = NULL WHERE library_section_id IN (3)

To finalise, things I have tried;

  • Import from SQL file made in the “Move Viewstate/Ratings support page”
  • Update any mismatched TV Shows (basically, my previous server have TheMovieDB for some of the Shows, so simply updated these to the TheTVDB guids
  • Corrected any view_counts > 1, whilst making sure the season/show view_count is updated also, just a thought I had
  • Re-run the SQL from “Move Viewstate/Ratings support page” about 10 times total now
  • Optimised the database
  • Cleaned bundles
  • Emptied trash
  • Restarted PMS
  • Cleared cache in Web Browser
  • Checked that the new Server’s On Deck “look back X weeks” is set to >= 156 (previously)
  • Updated random datetime fields in the metadata_item_settings table to see if that does anything, i.e. you can’t watch a season before the last episode is watched (yeah I know this would of been done correctly when being watched in old PMS

Please anyone help or find your nearest Plex Ninja/Employee! :smiley:

Bump bump? I really am lost here. Seems like a bug

Bump. Anyone have any ideas? (Nothing on my Plex Pass forum post, but it looks like that is closed now. Not sure why.

Bump. Anyone from the Plex workforce? :smile:

Hi there. Another staffer pointed me to this thread. Can you post a screenshot of your OnDeck screens? I’m a bit confused on what screens you are looking at.

Ignore my earlier post.

@antonclr said:
But this has only pulled across whether I have viewed the item or not. When I check On Deck, this is empty. If I go to a show, even though a lot are watched, the On Deck in the TV show doesn’t show either;

Correct, that process is only for copying the watched status. The OnDeck info is based on this info, so if this was done properly, the OnDeck should also carry over. OnDeck is based on the last watched date so maybe something isn’t quite right.

One weird thing, if I then watch the next item, everything sorts itself out, but with a shared server of around 10 people I need a blanket fix for this.

I get it now. Can you PM me your current database with the ratings already imported so I can check whats going on?

Good evening, I sure can. Just waiting for it to not be in use if you see this message in the next 15 minutes or so

@antonclr What ended up happening with this?

I didn’t end up getting any response from replying to the previous guy. I just left it, manually marked stuff as On Deck again on my own account and reported what shows my shared user base had as well and emailed them all.

I think this was an in-depth database issue with al the fields, I could not see what had happened after hours of research and comparing database changes between before and after watching a video to attempt to mark it all via sql as on deck again.

Would love to get some further detail on how Plex determines the On Deck stuff - I have 3 servers (identical content) and have figured out a good solution for syncing watch states across the servers, but not a good solution for the “On Deck”. Any info on how this is determined or could be manipulated would be greatly appreciated!