Release WatchedList - service to automatically save/restore watched state
(2017-01-26, 23:16)rickm Wrote: Please explain "The detection for mark as unwatched is based on a user inactivity counter." How does this work? There are multiple ways to toggle the watched state (menu items, the remote/keyboard "w" key). Are they all "caught" by WL as user actions?

The option "follow user setting watched/unwatched" reads out the result of xbmc.getGlobalIdleTime(). That means the endless loop in is checking, if the current idle timer is lower than the previous one. That means, that any kind of user interaction has happened (remote control key presses, etc.). A callback function on the change of the watched flag directly is not possible afaik.

(2017-01-28, 21:24)rickm Wrote: I was surprised that the minimum interval to autorun WL is 3 hours. A manual run on my server takes about 3 seconds
I think all I have to do is change 3600 to 60 in the "periodic execution" stanza and the interval becomes minutes instead of hours
Changing the code like you described would work, but the option mentioned above is supposed to solve the problem that you have. Instead of polling the Kodi movie library every minute, it only polls every 3 hours OR if something could have happened. Normally this sets the movie as watched in the WL database right after you finished watching it and you did your first remote control button press (idle timer goes from 90 minutes to 0, see above). If your script includes removing the movie from the Kodi database while the credits are still running, the described approach might not work, though, since the movie is no longer in the Kodi database.
Problem with polling minutely is, that I think the algorithm to sync the databases is not O(n), since it is not programmed very sophisticated, but more or less brute-force. That means if you double the size of your movies in the database, the sync could take e.g. four times as long and so on.
My addon: service.watchedlist
My HTPC: Kodi 18.3; Ubuntu 16.04 LTS x64; AMD A6-6400K; MSI FM2-A55M-E33; 4GB Kingston HyperX RAM; Streacom FC8B Evo with 120W picoPSU
Thread Rating:
  • 3 Vote(s) - 5 Average

Messages In This Thread
RE: WatchedList - service to automatically save/restore watched state - by schapplm - 2017-01-29, 11:16

Logout Mark Read Team Forum Stats Members Help
WatchedList - service to automatically save/restore watched state53