"watched" status disappearing?

Hi,

Once in a while my OSMC (running on a Raspberry Pi2) seems to forget the watched status of shows/movies seemingly randomly; not all of them get reset, but many do. How do I stop that from happening? I find it pretty annoying.

Cheers

Well you would need to find out what causes it.
First I would suggest to enable debug logging (maybe without the overlay displayed) and then when it happens suggest you make a copy of the log file to then analyse.

If it happens randomly it surely will take some work to investigate.

Are you sure your SD Card and power supply are all up to the job?

I appreciate that … this occurs maybe every couple of months. I have observed similar behaviour if I reboot the pi from within an ssh session; on that note: is there a way to make Kodi save things, be it from the command line or from the GUI interface?

And will enable debugging now.

Reasonably confident. The power supply is a stand-alone device, capable of 2A. Power for the external HDD is provided from yet another powersource.
As for the SD card: I’ve never seen errors in dmesg or on reboot.
What other means of checking it w/ confidence do you have in mind?

So it is kind of reproducible? You would not need to save anything manually. Things like watched status is automatically written to the database after you stop the movie.
So if you have issues with watched status that would mean you have issues with the database.

For a real test you would need to take a backup and then test with H2testw which would be a destructive (read/write) test.

But you also can do some easier test

  1. Check the data of the last write date of the database before and after reboot ls -lah .kodi/userdata/Database/
  2. Write a file to the SD card, check the md5sum, reboot and check again the md5sum of the file.

Is there a way to suppress the debug output while watching movies?

Do you happen to have Trakt installed? Another possibility maybe if you are using nfo files and have import watched status set in your advancedsettings file.

https://kodi.wiki/view/Log_file/Advanced

@tinkster1 as @darwindesign wrote there are other possibilities causing your issues. Maybe start by uploading full logs so that we can check your setup

First off, sorry for the late response, was spending time at the other half of my “lock-down bubble” …
I don’t think I have info files enabled; I will stop debugging, re-enable it and reboot. Will also check the time-stamp of the last write on the database file in a minute.

If you don’t have that don’t add it. We are looking for a cause so to allow us the best chance to spot something it would be advantageous for you to just upload full logs and post a link to them in this thread.

ls -lah .kodi/userdata/Database/
total 21M
drwxr-xr-x  3 osmc osmc 4.0K Apr 13 21:19 .
drwxr-xr-x 10 osmc osmc 4.0K Nov  3 11:36 ..
-rw-r--r--  1 osmc osmc 1.4M Apr 13 11:00 Addons27.db
drwxr-xr-x  2 osmc osmc 4.0K Aug  8  2019 CDDB
-rw-r--r--  1 osmc osmc  28K Nov  3 11:36 Epg12.db
-rw-r--r--  1 osmc osmc 212K Nov  3 11:36 MyMusic72.db
-rw-r--r--  1 osmc osmc  14M Apr 13 21:19 MyVideos116.db
-rw-r--r--  1 osmc osmc 4.7M Apr 13 21:19 Textures13.db
-rw-r--r--  1 osmc osmc  40K Nov  3 11:36 TV32.db
-rw-r--r--  1 osmc osmc  20K Apr  2 19:25 ViewModes6.db

And the full log: full kodi.log

You don’t have an advancedsettings file, Trakt, or a shared db so it is not anything I was originally thinking it might be. Are you not using a library and just selecting videos from “videos”? I wonder if your drive is changing names for some reason which would be seen as a different path so the files would have a different watched status.

On a separate note it would be highly prefered in the future to upload full logs in a manner described here…

https://osmc.tv/wiki/general/how-to-submit-a-useful-support-request/

The mount point is consistent, it’s always /media/<UUID> … I’m using the library.
An additional tidbit of info: the actual data is stored in an encfs encoded directory, which is mounted into /home/osmc/public and was added to the library from there.

Ooops - sorry. Will bare that in mind.

And you get just some of the watched status disappearing, but no duplicate library entries? I’m at a loss here to explain it as something other than db (sd card?) corruption but I would think you would have more issues than just some watched status info dissapearing if this was the case.

Nope, no dupes.

Same.

My first suspicion was that there’s something like “status aging”, so that movies I haven’t watched (again) in like over a year get presented as unwatched, but couldn’t find hints of such a setting in the UI, or questions about such a feature on line (might be poor google-fu, of course). Btw - I’m not using the standard OSMC skin but have switched to estuary, I like the way it presents me with extra info in the library.

Filesystem corruption of the sqlite DB should have way more dramatic ways of expressing itself, I would have thought.

There is no such thing. Using Estuary is not an issue with this problem or otherwise.

And I just had a look at the database itself; it would appear that anything I watched before 2019-11-04 lost its watched-status.

Is it safe to manually (using sqlite3) set everything without a playCount >= 1 to 1 and the lastPlayed date to today?

I think it will be quicker for me to interactively set things I haven’t watched so far to unwatched manually, rather than trying mark everything watched as watched.

If you plug in a keyboard you could just use the “w” key to toggle watched status. For TV shows you can do this for entire shows or seasons instead of individual episodes. Using the direction keys on the keyboard to navigate you can actually perform this kind of task very rapidly.

1 Like