Changing a previously played episode/show/movie to unplayed deletes the data from dashboard watch history

I’ll try and keep this simple. Take this scenario:

  • You watched a TV Show at some point in the past, I’ll use The Book of Boba Fett as an example. You have a full play history for that show which displays both dashboard in the web app and the plex dash app.
  • Then you decide to watch the show again and set the show to unplayed.

What happens is all your historical play history for that show is deleted. Looking in the DB I can also confirm this. If you run this query while you have the data you can see their is 7 records for this view history for the show …

sqlite> select count(id) from metadata_item_views WHERE grandparent_title GLOB 'The Book of Boba Fett*';
count(id)
---------
7

now in the plex UI go and mark this show unplayed and then run the exact same query again …

sqlite> select count(id) from metadata_item_views WHERE grandparent_title GLOB 'The Book of Boba Fett*';
count(id)
---------
0        
sqlite>

You can clearly see the count is now zero and all the historical view data is deleted. Checking in the dashboard and plexdash app confirms its also gone.

@anon18523487 hope its okay to tag you on this post as you have commented on similar issues in the past and might be able to help get attention on it.

1 Like

I’ll post a workaround to this issue for anyone else who runs into this.

What I done was to export all the historical view data before changing the view status from played to unplayed. At a high level this is what I done…

Stop plex. Then export the historical view data using the following command…

"/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db ".output metadata_item_views.sql" ".dump metadata_item_views"

That will create a metadata_item_views.sql file with the exported data.

Start plex again and now change the played status to unplayed. At this point the data is deleted from the db. Stop plex again. Now delete the existing historical data and re import it again from the export earlier:

"/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db
delete from metadata_item_views;
.quit

"/usr/lib/plexmediaserver/Plex Media Server" --sqlite com.plexapp.plugins.library.db ".read metadata_item_views.sql"

Start plex again and the historical data is back with the played status adjusted to how you want it.

Hopefully someone from plex will eventually fix this bug as its pretty bad and the workaround is a bit involved for most folks.

1 Like

Issue confirmed on Windows as well.
I have filed a bug.

Thank you for reporting it and the detailed analysis!

1 Like

Thanks, need to check if it also deletes data for other users if they’ve watched the same show. Hope to get some time later to check that.

@OttoKerner as an fyi… I tested a show which has played history for multiple users and can confirm that ONLY the user data for the user changing status is deleted. The other users play history remains. So that’s something at least.

1 Like

Any update on this data loss bug? It’s been over two months since I raised it.

1 Like

And another month passes by …

Keeping an eye out here too…

1 Like

Almost 6 months now since I raised this data loss bug and still not resolved yet.

Luckily as I know exactly what plex is doing wrong I can restore via sql when I do need to. It’s still a pretty bad bug IMO!

Problem still exists. Reset a show today and yet again it wiped all the previous watch history.

I’ve backups so could restore but it’s a right pain and wish plex would do something about it…

10 months have passed and this data loss bug still exists! Way to go plex :frowning:

Any news?

1 Like

Bump again. I’ve needed this for over a decade now. Are we close?

1 Like

Dear Otto, thank you for filing the report.
I preparation of the One-Year Anniverary of that bug - would you please be so kind to investigate on what distracts developers from fixing it? I mean, no pun intended … I know that devs always have more bugs to fix than they can - all the times. But since the workaround is not something easily done by average users, I would call it severe (since it deletes metadata). Maybe your investigation could spur some renewed attention to this problem.

Thank you in advance.

Ultimately this is data loss. Your previously watched data is deleted unknowingly to the user. This is not some misaligned button in the UI or something that does not look right. Your data is GONE and needs to be manually restored.

Plex should have rushed to fix this type of data loss but their priorties are elsewhere …

Any news?

13 months and still a bug. Today, finished re watching Star Trek Deep Space Nine and changed Star Trek Voyager from played to un played and you guested it, plex deleted ALL MY previously watched/played records for the show.

Frak’ing STUPID SOFTWARE!

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