elgatito / plugin.video.elementum

Elementum add-on for Kodi. Development of this addon has been stopped!
http://elementum.surge.sh
MIT License
490 stars 160 forks source link

Sync Watched States from Trakt into Kodi Library isn't working #217

Closed baelen-git closed 6 years ago

baelen-git commented 6 years ago

I've enabled the feature: "Sync Watched States from Trakt into Kodi Library" I'm not sure if I have the correct expectations but I hope that this feature will sync the watched states from Trakt into my Kodi Library :-)

I have a completely clean setup of Kodi version 17.6 with Elementum version 0.0.55 After I've authorized Trakt access for Elementum it started syncing all the Movies and TV Shows that I have in my Trakt Collection into my Kodi Library (Very cool!)

Unfortunately all the items that are added into my Kodi Library don't get their watched status updated. When I check the log file this part seems to be interresting:

18:32:08.373 T:1452331936  NOTICE: [plugin.video.elementum] Python version: ['2.7.13 (default, Mar 24 2018, 16:37:30) ', '[GCC 6.2.0]']
                                                dist: ('', '', '')
                                                linux_distribution: ('', '', '')
                                                system: Linux
                                                machine: armv7l
                                                platform: Linux-4.9.80-armv7l-with-glibc2.4
                                                uname: ('Linux', 'mediacenter', '4.9.80', '#1 SMP Fri Apr 13 11:08:35 BST 2018', 'armv7l', '')
                                                version: #1 SMP Fri Apr 13 11:08:35 BST 2018
                                                mac_ver: ('', ('', '', ''), '')
18:32:08.550 T:1533539232  NOTICE: [plugin.video.elementum] [GIN] 2018/07/26 - 16:32:08 | 200 |   17.708132ms |       127.0.0.1 | GET      /trakt/update
18:32:08.552 T:1533539232  NOTICE: [plugin.video.elementum] [[36mDEBU  library      ▶ RefreshTrakt     [[0mTraktSync: Watched
18:32:08.556 T:1452331936   ERROR: [plugin.video.elementum] Traceback (most recent call last):
18:32:08.557 T:1452331936   ERROR: [plugin.video.elementum]   File "/storage/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/navigation.py", line 188, in run
18:32:08.558 T:1452331936   ERROR: [plugin.video.elementum]     data = _json(url)
18:32:08.559 T:1452331936   ERROR: [plugin.video.elementum]   File "/storage/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/navigation.py", line 161, in _json
18:32:08.560 T:1452331936   ERROR: [plugin.video.elementum]     raise Exception(payload)
18:32:08.561 T:1452331936   ERROR: [plugin.video.elementum] Exception: LOCALIZE[30358]
18:32:08.561 T:1452331936   ERROR: [plugin.video.elementum]
18:32:10.103 T:1533539232  NOTICE: [plugin.video.elementum] [[33mWARN  tmdb         ▶ func1            [[0mBad status getting show for 37899: 404
18:32:10.139 T:1533539232  NOTICE: [plugin.video.elementum] [[36mDEBU  library      ▶ func1            [[0mTrakt sync watched finished in 1.593004066s
18:32:10.141 T:1533539232  NOTICE: [plugin.video.elementum] [[36mDEBU  library      ▶ RefreshUIDs      [[0mUIDs refresh finished

Any suggestions on what I can do to fix this problem? Any more information you need? I don't see a good solution right now. Look's like it's trying to query a TV Show that is not there (404 error). Or maybe it is there but it has a problem with the encoding (special characters or something because of the localization error). I would also be happy to find out which show it is and then I can just delete that show from my Library :-)

elgatito commented 6 years ago

Issue helper says you should at least give a log file. http://kodi.wiki/view/Log_file/Easy

baelen-git commented 6 years ago

sorry I was being lazy :-) Here you go! https://pastebin.com/181v5RWd

elgatito commented 6 years ago

When items are synced to Kodi library - they can't be set as Watched from the start. You can wait or run Trakt sync from Elementum settings, it will then see your Kodi items and set watched state for them.

baelen-git commented 6 years ago

Hi,

Correct, this is what I've done. First it took about 2 days to sync all the episodes from Trakt into my Library but it was successful. Now when I run "Update Trakt" from the Elementum plugin it finished in about 10 seconds but when I look in the logfile I see the error message that I've posted in my original post.

(See the pastebin for a debug log version of it )

elgatito commented 6 years ago

Please, update Elementum manually but installing from zip file: https://github.com/elgatito/plugin.video.elementum/releases/download/v0.0.58/plugin.video.elementum-0.0.58.zip

baelen-git commented 6 years ago

Done! Unfortunatly it didnt help.

First I've updated the plugin by installing from zip. Reboot and then run 'update trakt' and still no watch states.

Then I've deleted the elementum plugin, reboot, install from zip. Again no watch states, error in de kodi.log stays the same. Here is my logfile.

http://ix.io/1iwd

elgatito commented 6 years ago

You use TMDB for scraping movies and tv shows, right?

baelen-git commented 6 years ago

No I was using TVDB for Shows. (that was the default on installation) I've now changed it to TMDB and it's gonna take a while to update my library :-D

I'll let you know when its finished

elgatito commented 6 years ago

You won't have setted watch state for both, movies and shows? or only for shows?

baelen-git commented 6 years ago

That is correct, I'm only missing the watched state for Shows. For Movies the Watched state is synced. Sorry i didnt mention that earlier (didnt notice it earlier either :-))

elgatito commented 6 years ago

Then you should see some progress. Syncing shows is not perfect, because if differences between Trakt and TMDB/TVDB databases, and there is enough to be done in that field, but still, it's pretty usable.

baelen-git commented 6 years ago

Hi.

I've updated all my tv shows with the TMDB info. However still no watched states are being synced. I keep getting this error, however I'm not sure that it is related.


17:13:36.350 T:1351803808   DEBUG: [plugin.video.elementum] Requesting http://127.0.0.1:65220/trakt/update from ['plugin://plugin.video.elementum/trakt/update', '-1', '']
17:13:36.380 T:1945346624   DEBUG: ------ Window Init (DialogNotification.xml) ------
17:13:36.389 T:1505797024  NOTICE: [plugin.video.elementum] [GIN] 2018/07/31 - 15:13:36 | 200 |   18.757312ms |       127.0.0.1 | GET      /trakt/update
17:13:36.392 T:1351803808   ERROR: [plugin.video.elementum] Traceback (most recent call last):
17:13:36.393 T:1351803808   ERROR: [plugin.video.elementum]   File "/storage/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/navigation.py", line 176, in run
17:13:36.393 T:1351803808   ERROR: [plugin.video.elementum]     data = _json(url)
17:13:36.394 T:1351803808   ERROR: [plugin.video.elementum]   File "/storage/.kodi/addons/plugin.video.elementum/resources/site-packages/elementum/navigation.py", line 161, in _json
17:13:36.395 T:1351803808   ERROR: [plugin.video.elementum]     raise Exception(payload)
17:13:36.395 T:1351803808   ERROR: [plugin.video.elementum] Exception: LOCALIZE[30358]
17:13:36.396 T:1351803808   ERROR: [plugin.video.elementum]
17:13:36.397 T:1351803808    INFO: CPythonInvoker(25, /storage/.kodi/addons/plugin.video.elementum/navigation.py): script successfully run
17:13:36.617 T:1505797024  NOTICE: [plugin.video.elementum] DEBU  library      ▶ RefreshTrakt     TraktSync: Watched
17:13:36.617 T:1351803808    INFO: Python script stopped
17:13:36.617 T:1351803808   DEBUG: Thread LanguageInvoker 1351803808 terminating
17:13:36.981 T:1526137760   DEBUG: CWebServer[8080]: request received for /jsonrpc
17:13:37.512 T:1505797024   DEBUG: Previous line repeats 1 times.
17:13:37.513 T:1505797024  NOTICE: [plugin.video.elementum] DEBU  library      ▶ func1            Trakt sync watched finished in 1.128322625s

Any other suggestions I could do? Is there any other kind of debugging I could do? The kodi.log doesn't give much information, not even with debug logging on. I also checked http://kodi_ip:yourcrazyport/debug/all but that doesn't tell me much either.

baelen-git commented 6 years ago

Hi, Any more suggestions? I keep getting the error about the localize but I doubt that's the actually problem? Maybe it is though... sync watched states finished in 1 second so I guess it's not working correctly

baelen-git commented 6 years ago

Here is the latest logfile with debug mode on. Still no watched states are synced. Do you have any other ways how i can debug this problem?

http://ix.io/1kF4

OakSorcerer commented 6 years ago

I have the exact same problem. It's strange that in summer everything was fine. Now I can get synch state only for movies, but not for shows. My setup is Ugoos Am 3 with Android 7 + Kodi 17.6 and latest Elementum. One more strange thing, that I can clean my library on the android device, and all old episodes synch without a problem after the library scan, but not fresh ones. I have also tried windows 10 edition of latest Kodi beta 3, and the results were the same.

elgatito commented 6 years ago

Please, try with 0.0.62.

baelen-git commented 6 years ago

SUCCESS!!!! thank you so much

Op wo 14 nov. 2018 om 20:56 schreef Denis notifications@github.com:

Please, try with 0.0.62.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/elgatito/plugin.video.elementum/issues/217#issuecomment-438796895, or mute the thread https://github.com/notifications/unsubscribe-auth/AKn0PnNHKPdxrY1l0XwHIL6m37eweL4qks5uvHVsgaJpZM4ViLR3 .