Kodi Community Forum

Full Version: Kodi not saving "watched" state for some TV files
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After watching some TV episodes, the episode's "watched" flag appears in the list view, but after navigating away from the episode's directory then returning, the "watched" flag is gone. This only happens for some series, usually those that have been on the system for a long time. If I remove the series from the library and re-add it, the problem no longer occurs.

This is happening on a stock installation of LibreElec (Krypton) 8.2.5 on a Raspberry Pi 2B, but also occurred with a previous OSMC installation (Jarvis & Krypton) on the same RPi, and also on a Windows 10 PC. All machines use a shared MySQL 5.5.59 Kodi database running under Raspbian on a separate RPi 3B, which is doing double duty as a Samba server for my media files. Since the issue occurs on multiple Kodi clients on different machines and architectures, I'm guessing that something is misfiring with MySQL.

I'm seeing an update query in the log for the files table (below) which seems to be working, but don't see any similar queries for the episode_view table (which seems to be where the episode's playCount and lastPlayed are saved), either for episodes that save or don't properly save the "watched" state.
Code:
14:07:08.396 T:2676   DEBUG: CSaveFileStateJob::DoWork - Saving file state for video item smb://RASPBERRYPI/Television/Frasier/Season 2/S02E17 - Daphne's Room.avi
14:07:08.416 T:2676   DEBUG: CSaveFileStateJob::DoWork - Marking video item smb://RASPBERRYPI/Television/Frasier/Season 2/S02E17 - Daphne's Room.avi as watched
14:07:08.424 T:2676   DEBUG: Mysql execute: update files set playCount=3,lastPlayed='2018-10-18 14:07:08' where idFile=20960

No nonstandard Kodi add-ons are in play.

Does anyone have any suggestions for further troubleshooting? I've cleaned the library, dumped, dropped, re-created and reloaded the MyVideos107 database from the dump file, and can't think of anything else to try.

Pastebin: https://paste.kodi.tv/lipelakozi.kodi
Not too sure if that helps, but I see a bunch of:

14:06:27.244 T:6996 DEBUG: [Warning] CGUITextureManager::GetTexturePath: could not find texture 'OverlayUnwatched.png'

If I´m not wrong, you are using Confluence. If so, could you please try Estuary and see if the behaviour is the same?
No change in the behavior using Estuary, fresh log below.

Log: https://paste.kodi.tv/sonifocile.kodi
Having had the same/a similar issue I noticed that 
Code:
update files
would always update the same entry (same id) which was from a completely different show all together.
I can only assume that either with the migration from K17 to K18 something messed up the data set or... I don't know tbh.

Anyways. I setup the database from scratch and everything's in order now (good thing I keep everything in sync with trakt)