Kodi Community Forum

Full Version: WatchedList - service to automatically save/restore watched state
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35
@ribtin

Have they been scanned into your library?
(2019-02-05, 21:11)Karellen Wrote: [ -> ]@ribtin

Have they been scanned into your library?
Yep.
How? NFO Files?

If yes, did you include a Unique ID entry like the following, replacing xxxx with, say for example, home and with a value of, say, home001 which increments for each movie.
xml:
<uniqueid type="xxxx" default="true">home001</uniqueid>
(2019-02-05, 23:57)Karellen Wrote: [ -> ]How? NFO Files?

If yes, did you include a Unique ID entry like the following, replacing xxxx with, say for example, home and with a value of, say, home001 which increments for each movie.
xml:
<uniqueid type="xxxx" default="true">home001</uniqueid>
 Ah. So that would mean I'd have to edit all the nfo files manually? I've got thousands of them..
Well that is a lot, and I can't think of an easier way to do it, unless you know SQL and can just run an insert, so the edit NFO File then Refresh it back into the library seems to be the only way.

As you don't have a UniqueID attached to the movie, it is possible to get issues with Kodi doing unexpected things, and you have just discovered one using this Add-on.

It is a much bigger problem with TV Shows where everything without an ID is given the default -1 database value, which means all your TV Shows and episodes with that value will be mixed into one TV Show.
(2019-02-06, 00:08)Karellen Wrote: [ -> ]Well that is a lot, and I can't think of an easier way to do it, unless you know SQL and can just run an insert, so the edit NFO File then Refresh it back into the library seems to be the only way.

As you don't have a UniqueID attached to the movie, it is possible to get issues with Kodi doing unexpected things, and you have just discovered one using this Add-on.

It is a much bigger problem with TV Shows where everything without an ID is given the default -1 database value, which means all your TV Shows and episodes with that value will be mixed into one TV Show.
 Ah, I see. A large bunch of my unlisted files are tv-shows though, and they are not mixed together like you say. So that part seems to work perfectly at least.
(2019-02-06, 00:11)ribtin Wrote: [ -> ]So that part seems to work perfectly at least.
Ok, that is good. But at least you know the cause if you one day open your library and the episodes have disappeared and are part of another tv show. Smile
(2019-02-06, 00:13)Karellen Wrote: [ -> ]
(2019-02-06, 00:11)ribtin Wrote: [ -> ]So that part seems to work perfectly at least.
Ok, that is good. But at least you know the cause if you one day open your library and the episodes have disappeared and are part of another tv show. Smile 
Yeah, hehe hope that never happens =)

Some of these shows I've used Ember Media Manager to create the .nfos for, and when I did it like that, it still did not include any "UniqueID" tag in the .nfos.
It's been a long, long time since I used Ember so don't remember how it is done, but the media managers don't create the ID, it has to come from somewhere, either the scraper or you. As you did not use a scraper for home movies, it had to be manually entered.

Yep, it should be in big flashing neon lights somewhere!!
(2019-02-06, 02:26)Karellen Wrote: [ -> ]It's been a long, long time since I used Ember so don't remember how it is done, but the media managers don't create the ID, it has to come from somewhere, either the scraper or you. As you did not use a scraper for home movies, it had to be manually entered.

Yep, it should be in big flashing neon lights somewhere!!
 Thanks for the responses =)
This is one interesting add-on. I'm loving it but having some problems.

Initially, I tried placing the watchedlist database on a SMB connected NAS but smacked into locking and update problems. Not unreasonable. So I shifted to a MySQL database running on a Windows 10 machine. Works great.

My HTPC is Kodi 17.6 with watchedlist 1.2.5 running on Manjaro Linux. Last night I watched a movie. I can see from the Kodi log that the watchedlist service marked it as watched. And I checked the MySQL database and confirmed that the change was reflected in the database. Perfect.

However, after that have not been able to provoke any more log entries. Also, I had configured watchedlist on a 3 hour periodic timer and these entries appear to have stopped as well. It seems the service has crashed or is hung.

There are absolutely no hints in Kodi.log. Any thoughts how I can go about trying to diagnose the problem?
More info regarding last post...

I restarted Kodi with debug logging. watchedlist was on a 3 hour timer and it ran successfully at 11:32, 14:32, and 17:32.

At around 19:55 (when I watched some shows) watchedlist appeared to go a little bonkers and ran many times in rapid succession after which it seems to have died. Zero activity before I exited Kodi at 09:33 the next day.

Debug log here: https://paste.kodi.tv/ebufebuxev.kodi
So, I have isolated an easily reproducible problem with the watchedlist add-in. Steps:

1. Kodi 17.6 or 18.0 on Windows or Linux
2. Watchedlist 1.2.5
3. Configure watchedlist to use either MySQL or a local Sqlite database
4. Check update movies and episodes, autostart mode periodic (3 hours) and follow user
5. Be watching a video when the next periodic update is triggered after 3 hours

If you are watching a video when a periodic update is triggered, watchlist is effectively disabled and stops propagating any updates to the wl database. No more periodic updates are executed. And it does not process updates when the user manually sets a video watched/unwatched.

I will take a peek at the code but don't have any experience with Kodi add-ins or Python.

Please let me know if I should forward this info anywhere else.
Well, here's at least part of the problem:
Quote:while xbmc.Player().isPlaying() and not manualstart:
                if self.monitor.waitForAbort(60 * 1000):
                    return 1  # wait one minute until next check for active playback
                if not xbmc.Player().isPlaying():
                    if self.monitor.waitForAbort(180 * 1000):
                        return 1  # wait 3 minutes so the dialogue does not pop up directly after the playback ends

monitor.waitForAbort() takes seconds (not milliseconds) as a parameter :-)
Thanks for digging into the code. It seems that I never tested that case.
Could you please check, if my fix in the testing branch fixes the problem?
Somehow my testing configuration is broken since my upgrades on Ubuntu 18.04 / Kodi 18 :-(
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35