Transferring Watched Status

Hi all,

I’m trying to transfer watched status of Movies and TV Shows between two Linux Servers and I’m having issues.

I’ve copied the data across and followed this method and it has not been 100% successful. The Movie status seems correct but most of the TV Shows are not correct, the latest couple are but all the others have been marked at not watched, which is incorrect.

Is there anything else I need to do to correct this?

TIA

Sounds like you might have changed the agent for your old tv-show library but not refreshed the metadata. This can result in the “old stuff” still being linked to the ID of the old agent – in consequence the new server (using the new agent) won’t be able to link those records.

If you still have access to the old server, try to refresh the tv-show library’s metadata before migrating the viewstates to your new server.

Thanks, I’ll check that.

I suppose the agents would also need to be the same for each library too?

Also ensure the matching is identical between the source and target systems. If you have stuff unmatched, incorrectly matched and/or episode ordering is different it won’t register correctly when importing the watch status.

In addition, from what I remember when I done this I dropped the table in the target db just before importing the export from source. Wanted to ensure I’d a clean import. I can post the commands if you wish later when I’m back at my pc.

Sorry but can you expand on this?

You mean the metadata_items_settings table? Or you could just delete all the data in the table.

Would be helpful, thank you.

Well, if a show is matched in source when you export but is unmatched in your target (or incorrectly matched with say another show) it won’t import the watched status from my experience.

Same would be true for individual episodes which can happen if different episode ordering is used (TVDB Aired vrs TVDB DVD etc… )

Looking at my notes this is what I done …

"/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db
delete from metadata_item_settings;
select count(id) from metadata_item_settings;
.quit
cat settings.sql | "/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db

Plex was stopped when I done this. I also ensured I had a full backup in case things went bad.

Thank you, that’s exactly what I did today after refreshing the metadata on the source, and it’s still missing some of the TV Shows and not marking as watched.

Just thinking out loud…
What would happen if the series on the source had finished? Would that stop adding the metadata to the db? It’s shows like Man in an Orange Shirt that are not correct on the new server.

Let’s use Man in an Orange Shirt as the example here. Could you let us know how’s the shows media is named on disk?

Also, are you 100% sure it’s matched correctly both at source and target and the same agent/scanner has been used on source and target?

Sorry, if you have checked this already but think it could be important.

Thanks for your reply, I appreciate you taking the time to help.

Unfortunately I deleted Man in an Orange Shirt, so lets work with a series called Five Bedrooms, it’s an Australian Series. 3 Seasons, 8 Episodes per season. All series of all seasons being watched by two users. Season 1 & 2 are marked as watched on the target server and season 3 is not marked as watched at all. All episodes are named in the format Five Bedrooms SxxEyy. eg: Five Bedroons S03E01.

We will work with S03E01 as an example. On the source server the GUID, from the XML data is 61a6d85a64f0f47df53d3531. However on the target server the GUID is 61a8e83ee71f79d83e6b769a. And hence our issue.

Note the different lengths of the GUID’s.

This points to either different agent/scanner, but how can seasons 1 & 2 be correct and not season 3.

I’ll stop here and await your thoughts.

Thanks again.

One guess would be that one uses tvdb episode ordering and the other tmdb so that would be the first thing to rule out.

Second guess from looking at S03 of that show is that S03 is kinda new with tmdb not having much metadata for it. I wonder if you done a force refresh of metadata on your source system would it update the GUID to match the new target?

Could you actually attach the xml for that episode from the both source and target? Might help in debugging.

xml.zip (2.7 KB)

XML is attached.

Doing a force refresh on the source S03E01 did not change the GUID.

Both source and target have Library Default as the episode ordering.

Both TV Shows Libraries are set to The TVDB Episode Ordering.

Okay so …

Target xml has :
<Guid id="tmdb://3368601"/>

Source xml has:
<Guid id="tvdb://8863459"/>

If both are using library default then lets next check what the library is set to next. That’s under settings → manage → libraries and then edit library and select the advanced tab. Your looking for something like this. The episode ordering I suspect is different.

Screenshot from 2022-01-23 22-54-47

Ideally I’d imagine both source and target need to match as much as possible here for all settings. I know when I done it I ensured they did.

110% both the same.

Did you notice the Source has 2 Guid id=

EDIT: Think I’ve found the issue. When I download the TV Shows & inserted the SQL into the target db I had not matched the library agents from the source. I did this after the fact.

So I have refreshed the metadata in the target and all the non watched shows have turned to watched.

Lesson learnt, make sure all the agents in the target libraries and the same before you copy anything from the source.

Thanks very much for all your assistance it was truly appreciated.

1 Like

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