• 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 35
Release WatchedList - service to automatically save/restore watched state
I fixed the imdb number. By removing the tv show, and rescanning it back in, the IMDB number is now showing on that GET TV SHOW JSON command. 

Thank you for this add on, and thank you for the help.
Reply
(2017-12-07, 04:45)slipknutz Wrote: I fixed the imdb number. By removing the tv show, and rescanning it back in, the IMDB number is now showing on that GET TV SHOW JSON command. 

Thank you for this add on, and thank you for the help.
Reply
Removed from where? Physically from the disk or from the database?
Reply
Hello,

I'm new here, I am using this add-on to simply sync my watched series between 2 Kodi Android TV without to have to rely on any external DB.

It worked so flawlessly I hardly have anything to say except Kudos Smile

Since a few days (weeks) I encounter a strange error: when trying to launch the process I get an error reading
Database error while opening /storage/emulated/0/Android/data/org.xbmc.kodi/files/.Kodi/userdata/addon_data/service.watcheedlist
File is encrypted or is not a database.

To be noted, I try to write on an son share, and it worked fine before.
If I set a local path it works fine.
I tried changing the SMB destination and resetting the permission, is is not linked to the storage unit.
It's as if it tries to write a local copy to an inexistent local path.

Do you have any idea about this issue?

Thanks in advance

Guigui
Reply
(2017-12-27, 23:59)guigui_bebert Wrote: Since a few days (weeks) I encounter a strange error: ...
The procedure of the addon for a database file on a network share is to copy it on the local filesystem (.kodi/userdata/addon_data/service.watchedlist/dbcopy or a similar path). Then the addon runs as normal and copies the file back to the network share.
So my guess is, that already the part of copying does not work for you. If you enable the debug logging (for kodi and watchedlist), your log file should contain something similar to this:
Quote:10:52:08.514 T:139943538456320  NOTICE: service.watchedlist: created directory /home/moritz/.kodi/userdata/addon_data/service.watchedlist/dbcopy
10:52:09.495 T:139943538456320  NOTICE: service.watchedlist: Dropbox database downloaded: /watchedlist.db -> /home/moritz/.kodi/userdata/addon_data/service.watchedlist/dropbox.db
...
10:52:09.499 T:139943538456320    INFO: service.watchedlist: database_backup: database backup copy created to /home/moritz/.kodi/userdata/addon_data/service.watchedlist/dbcopy/20171228_105209-watchedlist.db.zip
10:52:09.499 T:139943538456320 WARNING: FileNFS::...
10:52:09.503 T:139943538456320   DEBUG: CNFSFile::...
10:52:09.509 T:139943538456320   DEBUG: service.watchedlist: copied db file /home/moritz/.kodi/userdata/addon_data/service.watchedlist/dbcopy/watchedlist.db -> nfs://192.168.2.21/volume1/Archiv1/Anwendungsdaten/XBMC/service.watchedlist/watchedlist_nw.db. Success: 1
10:52:09.511 T:139943538456320  NOTICE: service.watchedlist: created directory /home/moritz/.kodi/userdata/addon_data/service.watchedlist/dbcopy
I used NFS but I also tested this with SMB network shares before. Perhaps you also have a corrupted database file already in your userdata folder.
Reply
(2017-12-28, 12:02)schapplm Wrote: The procedure of the addon for a database file on a network share is to copy it on the local filesystem (.kodi/userdata/addon_data/service.watchedlist/dbcopy or a similar path). Then the addon runs as normal and copies the file back to the network share.
So my guess is, that already the part of copying does not work for you. If you enable the debug logging (for kodi and watchedlist), your log file should contain something similar to this:

 Hello @schapplm ,

Thanks for the reply
From What I understood, the local part of the db file was failing.
Here is what I got in the log after turning debugging on:
 
Quote: 17:49:23.138 T:2123888928 NOTICE: service.watchedlist: Update Library Manual Run.
17:49:23.300 T:2123888928 NOTICE: service.watchedlist: created directory /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.watchedlist/dbcopy
17:49:23.305 T:2123888928 DEBUG: CSMBFile::Open - opened smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db, fd=10001
17:49:23.312 T:2123888928 DEBUG: CSMBFile::Close closing fd 10001
17:49:23.313 T:2123888928 DEBUG: service.watchedlist: copied db file smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db -> /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.watchedlist/dbcopy/watchedlist.db. Success: 1
17:49:23.315 T:2123888928 ERROR: service.watchedlist: Database error while opening /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.watchedlist/dbcopy/watchedlist.db. 'file is encrypted or is not a database'
17:49:23.315 T:2123888928 NOTICE: service.watchedlist: Notification. Watchedlist: SQLite Error (WL DB): file is encrypted or is not a database
17:49:23.322 T:2123888928 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db
17:49:23.324 T:18446744072108177696 DEBUG: ------ Window Init (DialogNotification.xml) ------
17:49:23.333 T:2123888928 DEBUG: CSMBFile::Close closing fd 10001
17:49:23.335 T:2123888928 DEBUG: service.watchedlist: copied db file /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.watchedlist/dbcopy/watchedlist.db -> smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db. Success: 1
17:49:23.336 T:2123888928 NOTICE: service.watchedlist: Notification. Watchedlist: Error: Error opening WL-database
17:49:23.343 T:2123888928 WARNING: SMBFile::OpenForWrite() called with overwriting enabled! - smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db
17:49:23.352 T:2123888928 DEBUG: CSMBFile::Close closing fd 10001
17:49:23.354 T:2123888928 DEBUG: service.watchedlist: copied db file /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/userdata/addon_data/service.watchedlist/dbcopy/watchedlist.db -> smb://READYNAS/Backups/Kodi/watchedList_Kodi_addon/Backups/watchedlist.db. Success: 1
17:49:23.354 T:2123888928 INFO: CPythonInvoker(23, /storage/emulated/0/Android/data/org.xbmc.kodi/files/.kodi/addons/service.watchedlist/manual.py): script successfully run
17:49:23.673 T:2123888928 INFO: Python script stopped
17:49:23.674 T:2123888928 DEBUG: Thread LanguageInvoker 2123888928 terminating  

Is there something I am missing?


Edit: I tried renaming the local file in /addon_data/... into .old: same issue, the newly created file is not accessible
Guigui
Reply
What you can try is:
  • copy the database file to a local folder and set WatchedList to use that local database file. By this we can check if this is related to the file itself or the network access (which could e.g. corrupt the file while copying with wrong permissions)
  • If the problem seems to be the file: Open the database file with a program like sqliteman, as described in the wiki.
  • If you can open the file with the other tool but not with Kodi/WatchedList, then it might be a version issue of the python sqlite3 module. Then the easiest thing for you is to create a new file: Just set the addon to use a file that does not exist and start it. After the first run which creates a new file, you can insert your data from the old file again using Export/Import syntax similar to this wiki subsection
Reply
@schapplm
Great addon. Just switched from nfo watchedstate updater to this. Very clean and well done! Smile

Small typo in us english: Settings "Startup delay beforE action [minutes]"
Missing the "e" at the end of "before".

Thanks again!
⬅️⬅️ Feel free to leave a 👍 on useful posts  |  A Confluence ZEITGEIST (A modern reimagination of Confluence)  |  axbmcuser REPO (Download Link)  |  Kodi 17.7 DSPlayer x64 BETTERGUI (2020 build)
Reply
Hello, Thank you for a superb addon, I have been using WatchedList for years.

I have a question around the Dropbox integration, which I have recently started using due to some form of issue I have with accessing the network located DB file. The dropbox integration is exactly what I needed and it worked very well for me on my system (OpenELEC). The problem is that I have had some strange issues with OpenELEC, so I tried LibreELEC, which solved my problems with OpenELEC (display issues).

My problem is that when I installed Watchedlist, and tried to configure Dropbox support, when I tried to setup the Dropbox API key, I get an error stating Dropbox API error in the top right hand corner of the screen. I thought it was strange, because I have never seen this on OpenELEC. I configured it fine before, and again on my Android device, and it worked fine. I then added a discreet GPU and installed OpenELEC (solving my display issues), but found that watchedlist did the same thing as with LibreELEC.

I assume it is a fault with Python, because when I viewed the log I found the following error:07:43:30.639 T:140070029313792 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!Error Type: <type 'exceptions.ImportError'>Error Contents: No module named pkg_resourcesTraceback (most recent call last):File "/storage/.kodi/addons/script.module.dropbox/authenticate.py", line 10, in <module>from lib.dropbox import DropboxOAuth2FlowNoRedirectFile "/storage/.kodi/addons/script.module.dropbox/lib/dropbox/__init__.py", line 3, in <module>from .dropbox import __version__, Dropbox, DropboxTeam, create_session # noqa: F401File "/storage/.kodi/addons/script.module.dropbox/lib/dropbox/dropbox.py", line 35, in <module>from .session import (File "/storage/.kodi/addons/script.module.dropbox/lib/dropbox/session.py", line 1, in <module>import pkg_resourcesImportError: No module named pkg_resources-->End of Python script error report<--
Any assistance getting the Dropbox API working please, this will be greatly appreciated.
Reply
(2017-12-31, 13:06)Original-MrBee Wrote: ... My problem is that when I installed Watchedlist, and tried to configure Dropbox support, when I tried to setup the Dropbox API key, I get an error stating Dropbox API error in the top right hand corner of the screen ...
The Dropbox authentification mechanism seems to be broken for Android devices. LibreElec seems to be a full linux distribution, but perhaps with a reduced set of python libraries. (I don't use it so I am not sure there).
Can you make sure, that you have the newest version of the dropbox module? Look in the .kodi/addons/script.module.dropbox/addon.xml. The current version should be 8.4.1, where an import error was fixed for the authentification.

A quick workaround could be to do the authentification on a Windows or Ubuntu machine and then just copy the entry dropbox_apikey of .kodi/userdata/addon_data/service.watchedlist/settings.xml

P.S. Please format your log output (e.g. as quote) for better readability and for avoiding eye cancer :-)
Reply
(2017-12-29, 11:03)schapplm Wrote: What you can try is:
  • copy the database file to a local folder and set WatchedList to use that local database file. By this we can check if this is related to the file itself or the network access (which could e.g. corrupt the file while copying with wrong permissions)
  • ...
 
  
Thanks for the answer, all the .db files are now empty.

Another thing that might help: I face the same issue when I set a brand new destination folder, the result is always the same: a file 8 Kb is created (watchedlist.db or anything that I specify) but the error is the same.

From what I see the old files that have been backuped by the system were 90 Kb.

I'll try to generate a local .db file but from my previous tests it worked flawlessly.

I'll also try to create a local file at the temporary destination before it is transfered to the SMB to see if in this case it works.

Guigui
Reply
(2017-09-07, 01:30)Numus Wrote: I moved the watchedlist.db to my SMB share and pointed the addon at it. It says "error opening WL_Database"

Is this still an issue that hasn't been resolved or can this not be pointed at an SMB?

I have the same problem (on Windows 7).

Is there a fix (that is not using mysql)? It works via a mapped network drive, but that is problematic for me for other reasons.

03:55:33.239 T:4868  NOTICE: service.watchedlist: Update Library Manual Run.
03:55:33.241 T:4868 WARNING: service.watchedlist: db path does not exist: \\SERVER\Kodi\WatchedList\
03:55:33.241 T:4868  NOTICE: service.watchedlist: Notification. Watchedlist: Error: Error opening WL-database

<setting value="watchedlist.db" id="dbfilename"/> <setting value="smb://SERVER/Kodi/WatchedList/" id="dbpath"/>

Of course, the path \\SERVER\Kodi\WatchedList\ does in fact exist, and I can access it in Windows.
Reply
Hello @schapplm

Sorry for the delay I did not have the time to have a further look at the issue.

Since mid decemebr I have not been able to get the addon working on a SMB share, it was working properly before that. This happens on the 3 android TV devices that I have tested.
Another add-on (Backup) works fine over SMB on the exact same shared folder and cleaning/changing/renaming the destination folder does not work.

@Numus I do not think the issue is the same, I even get a file on my SMB share, but it is empty.

Regards

Guigui
Reply
Finally I was able to look into the SMB+Windows issues that were reported for a few months now and was able to reproduce them:
Quote:From github (Sep. 2017): I have Kodi installed from the windows store on Windows 10.. The SMB path for the db file doesnt work on windows... I tested SMB paths on android and it works fine... says Can't access file at \SMBpath\path\watchedlist.db (I changed the path names but I know they are correct on my settings).
(2017-09-07, 01:30)Numus Wrote: I moved the watchedlist.db to my SMB share and pointed the addon at it. It says "error opening WL_Database"
Is this still an issue that hasn't been resolved or can this not be pointed at an SMB?
(2018-01-29, 19:58)thei Wrote: I have the same problem (on Windows 7).
Is there a fix (that is not using mysql)? It works via a mapped network drive, but that is problematic for me for other reasons.
[...]
Of course, the path \\SERVER\Kodi\WatchedList\ does in fact exist, and I can access it in Windows.
 
Unfortunately, my own tests seem to date back a little.
(2017-12-28, 12:02)schapplm Wrote: I used NFS but I also tested this with SMB network shares before. Perhaps you also have a corrupted database file already in your userdata folder.
It seems that this already stopped working between Kodi 12 and 13.

The problem was, that the support for the backslash-notation for windows network shares (\\server\share) is not supported (unofficially) any more. Also the syntax smb://user:password@server/share was not translated correctly by my addon. I submitted a fix which should be available in the next week. Please let me know, if the problem still persists after the update to addon version 1.2.5.

As for SMB problems on Android:
(2018-01-30, 09:49)guigui_bebert Wrote: Since mid decemebr I have not been able to get the addon working on a SMB share, it was working properly before that. This happens on the 3 android TV devices that I have tested.
Another add-on (Backup) works fine over SMB on the exact same shared folder and cleaning/changing/renaming the destination folder does not work.
I did not have any idea how to solve your problem yet. It is probably not a general Unix+SMB problem, since it seems to work on some machines. I am not sure how your configuration would be different from mine or others. So I do not think my update will fix your problem.
Edit: One final thought. Eventually this is a permissions problem after all. It is possible to store the smb credientials (username and password) for shares globally in a configuration file and access the share with smb://server/share or one can set the username and password also in the path like smb://user:pass@server/share. Did you try both ways? On my system (Ubuntu 14) I had to type in the password to get access.
Reply
I have the same probleme here were WatchedList is unable to open the database file if it is stored on a smb path.
Failure in the log:

10:59:33.514 T:9608 ERROR: service.watchedlist: Database error while opening smb://NAS/Kodi Watchedlist/watchedlist.db. 'unable to open database file'
10:59:33.514 T:9608 NOTICE: service.watchedlist: Notification. Watchedlist: SQLite Fehler (WL DB): unable to open database file

I also can confirme that this issue is only if Kodi runs on Windows. My Raspi with Libreelec and the same Version of WachedList 1.2.4 can access the database file on the same smb path.
If I store the database file on the Windows harddrive directly the WatchedList also works perfect.
Reply
  • 1
  • 14
  • 15
  • 16(current)
  • 17
  • 18
  • 35

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