On deck is broken from new server move

Also posted in General discussions (Public) - 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: