Kodi Community Forum

Full Version: Trakt.tv v3
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I never use streams, so I can't help. You probably just the first to find this behavior, there have been some very big changes lately and some fallout is expected. So please check, why it's (not) happening.
(2018-04-09, 09:23)Razze Wrote: [ -> ]I never use streams, so I can't help. You probably just the first to find this behavior, there have been some very big changes lately and some fallout is expected. So please check, why it's (not) happening.
 Well in what appears to be coincidental and very weird timing - the issue now seems to be no more....

installed latest nightly of K18: KodiSetup-20180409-9f206f47-master-x64.exe

and now see and get the expected behavior and debug log entries on playback end for rate and scrobble tasks .....

Code:
01:34:59.309 T:25184    INFO: initializing python engine.
01:34:59.309 T:25184   DEBUG: CPythonInvoker(219, C:\Users\Mario\AppData\Roaming\Kodi\addons\script.trakt\defaultscript.py): start processing
01:34:59.320 T:23516   DEBUG: [script.trakt] resources.lib.service: [traktPlayer] onPlayBackEnded() - 0
01:34:59.369 T:23516   DEBUG: [script.trakt] resources.lib.service: Queuing for dispatch: {'action': 'ended'}
01:34:59.457 T:23516   DEBUG: [script.trakt] resources.lib.service: Queued dispatch: {u'action': u'ended'}
01:34:59.458 T:23516   DEBUG: [script.trakt] resources.lib.service: Dispatch: {u'action': u'ended'}
01:34:59.459 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: playbackEnded()
01:34:59.462 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: scrobble()
01:34:59.464 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: scrobble sending show object: {'ids': {u'tmdb': 18014, u'tvdb': 97731, u'trakt': 17933, u'imdb': u'tt1430587', u'tvrage': 22690, u'slug': u'tosh-0'}}
01:34:59.465 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: scrobble sending episode object: {u'season': 6, 'user': {'ratings': {}}, u'ids': {u'tvdb': 4834166, u'tmdb': 1007168, u'imdb': u'tt3627326', u'tvrage': 0, u'trakt': 568965}, u'number': 8, u'title': u'Comedian Daniel Songer'}
01:35:00.041 T:23516   DEBUG: [script.trakt] requests.packages.urllib3.connectionpool: https://api.trakt.tv:443 "POST /scrobble/stop HTTP/1.1" 201 None
01:35:00.106 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: [traktPlayer] Setting is enabled to try secondary show title, if necessary.
01:35:00.107 T:23516   DEBUG: [script.trakt] resources.lib.scrobbler: Scrobble response: {u'sharing': {u'tumblr': False, u'twitter': False, u'facebook': False}, u'episode': {u'season': 6, u'ids': {u'tvdb': 4834166, u'tmdb': 1007168, u'imdb': u'tt3627326', u'tvrage': 0, u'trakt': 568965}, u'number': 8, u'title': u'Comedian Daniel Songer'}, u'show': {u'year': 2009, u'ids': {u'tmdb': 18014, u'tvdb': 97731, u'trakt': 17933, u'imdb': u'tt1430587', u'tvrage': 22690, u'slug': u'tosh-0'}, u'title': u'Tosh.0'}, u'action': u'scrobble', u'progress': 99.9897627612248, u'id': 3535722861L}
01:35:00.107 T:23516   DEBUG: [script.trakt] resources.lib.rating: Rating Check called for 'episode'
01:35:00.108 T:23516   DEBUG: [script.trakt] resources.lib.rating: Summary Info {u'season': 6, 'user': {'ratings': {}}, u'ids': {u'tvdb': 4834166, u'tmdb': 1007168, u'imdb': u'tt3627326', u'tvrage': 0, u'trakt': 568965}, u'number': 8, u'title': u'Comedian Daniel Songer'}
01:35:00.123 T:17956   DEBUG: ------ Window Init (C:\Users\Mario\AppData\Roaming\Kodi\addons\script.trakt\resources\skins\Default\720p\script-trakt-RatingDialog.xml) ------
01:35:00.123 T:17956    INFO: Loading skin file: C:\Users\Mario\AppData\Roaming\Kodi\addons\script.trakt\resources\skins\Default\720p\script-trakt-RatingDialog.xml, load type: LOAD_ON_GUI_INIT

latest commits must have fixed things.

Huzzah! Smile

Thanks,

Mario
Glad to hear Big Grin
(2018-04-10, 12:11)Razze Wrote: [ -> ]Glad to hear Big Grin
 Actually now it's not working again - talk about driving me crazy and nothing has changed since it started "working" again last night.

The strange thing is - other scripts like skin.helper etc all are detecting on playback end but trakt for some reason is not I guess I can say "all the time" since it seems to be intermittent which makes it all the more frustrating to try to find a root cause.

I haven't look at the code too hard yet - but it trakt's method of triggering scrobble and rating on playback ending something that could get tripped up on a race condition (for lack of a better term)?

I notice that when it fails it does fire off a sync, but it's a "manual" sync?

Code:
23:41:47.126 T:10836   DEBUG: [script.trakt] resources.lib.service: Queued dispatch: {u'action': u'manualSync', u'silent': True, u'library': u'all'}
23:41:47.126 T:10836   DEBUG: [script.trakt] resources.lib.service: Dispatch: {u'action': u'manualSync', u'silent': True, u'library': u'all'}
23:41:47.126 T:10836   DEBUG: [script.trakt] resources.lib.service: Performing a manual sync.
23:41:47.127 T:10040   DEBUG: [script.trakt] resources.lib.sync: Sync is being run silently.
23:41:47.128 T:10040   DEBUG: [script.trakt] resources.lib.sync: Starting synchronization with Trakt.tv
23:41:47.128 T:10040   DEBUG: [script.trakt] resources.lib.syncMovies: [Movies Sync] Getting movie data from Kodi

My thinking is that trakt's playback monitor is what is tripping it up possibly - debug never shows it detects playback ending or at least doesn't attempt a scrabble and rating request but does a sync - which maybe not tied to playback but library updates?

Thanks for any insight on where to look next

M.
Synching is weird, are you sure you have no custom bindings done for that? It only happens if it's directly cal, which we don't do in the plugin - besides when you start the script manually from the options.

Haven't updated my machine in the last few days, will try to do later and see if I can replicate. Wouldn't be surprised if something goes wrong, as we are changing pretty big stuff at the minute.
(2018-04-11, 09:27)Razze Wrote: [ -> ]Synching is weird, are you sure you have no custom bindings done for that? It only happens if it's directly cal, which we don't do in the plugin - besides when you start the script manually from the options.

Haven't updated my machine in the last few days, will try to do later and see if I can replicate. Wouldn't be surprised if something goes wrong, as we are changing pretty big stuff at the minute.
I don't think I have any custom bindings set for Trakt to sync "manually".

I can start looking for something that does unbeknownst to me - what is the call to the Trakt add on for a manual sync so I can start grep and awk'ing for such a troublemaker.

Thanks

M
I must have changed a setting or something. I used to watch a TV episode or a movie and at the end the Trakt rating bar would appear and allow me to rate what I had just watched. This quit working.....why or what do I adjust to get this feature back?
Thanks
Hey Razze, is there any reason that Trakt scrobbles Tv shows fine in Embycon but not movies, or is it a fluke that it's even able to scrobble Tv shows, hope you can help I can provide logs if needed.
(2018-04-12, 19:25)mgonzales Wrote: [ -> ]
(2018-04-11, 09:27)Razze Wrote: [ -> ]Synching is weird, are you sure you have no custom bindings done for that? It only happens if it's directly cal, which we don't do in the plugin - besides when you start the script manually from the options.

Haven't updated my machine in the last few days, will try to do later and see if I can replicate. Wouldn't be surprised if something goes wrong, as we are changing pretty big stuff at the minute.
I don't think I have any custom bindings set for Trakt to sync "manually".

I can start looking for something that does unbeknownst to me - what is the call to the Trakt add on for a manual sync so I can start grep and awk'ing for such a troublemaker.

Thanks

 should be manualSync

 
(2018-04-12, 20:23)melons2 Wrote: [ -> ]I must have changed a setting or something. I used to watch a TV episode or a movie and at the end the Trakt rating bar would appear and allow me to rate what I had just watched. This quit working.....why or what do I adjust to get this feature back?
Thanks

Which version are you using?

(2018-04-12, 20:30)Supersilver Wrote: [ -> ]Hey Razze, is there any reason that Trakt scrobbles Tv shows fine in Embycon but not movies, or is it a fluke that it's even able to scrobble Tv shows, hope you can help I can provide logs if needed.

No idea about embycon, but which version are you using?
(2018-04-12, 21:40)Razze Wrote: [ -> ]
(2018-04-12, 19:25)mgonzales Wrote: [ -> ]
(2018-04-11, 09:27)Razze Wrote: [ -> ]Synching is weird, are you sure you have no custom bindings done for that? It only happens if it's directly cal, which we don't do in the plugin - besides when you start the script manually from the options.

Haven't updated my machine in the last few days, will try to do later and see if I can replicate. Wouldn't be surprised if something goes wrong, as we are changing pretty big stuff at the minute.
I don't think I have any custom bindings set for Trakt to sync "manually".

I can start looking for something that does unbeknownst to me - what is the call to the Trakt add on for a manual sync so I can start grep and awk'ing for such a troublemaker.

Thanks

M   
 should be manualSync

 
(2018-04-12, 20:23)melons2 Wrote: [ -> ]I must have changed a setting or something. I used to watch a TV episode or a movie and at the end the Trakt rating bar would appear and allow me to rate what I had just watched. This quit working.....why or what do I adjust to get this feature back?
Thanks

Which version are you using?
(2018-04-12, 20:30)Supersilver Wrote: [ -> ]Hey Razze, is there any reason that Trakt scrobbles Tv shows fine in Embycon but not movies, or is it a fluke that it's even able to scrobble Tv shows, hope you can help I can provide logs if needed.

No idea about embycon, but which version are you using?  
I am using version 3.2.0 of the addon but I get the behavior in both KODI 17.6 and 18 alpha or nightly
(2018-04-12, 20:30)Supersilver Wrote: [ -> ]Hey Razze, is there any reason that Trakt scrobbles Tv shows fine in Embycon but not movies, or is it a fluke that it's even able to scrobble Tv shows, hope you can help I can provide logs if needed.

(2018-04-11, 09:27)Razze Wrote: [ -> ]No idea about embycon, but which version are you using?

I am using 3.2.0
Sorry which kodi version Smile
(2018-04-13, 09:31)Razze Wrote: [ -> ]Sorry which kodi version Smile
Oh sorry [emoji14] Kodi 17.6 Krypton
(2018-04-05, 23:53)Razze Wrote: [ -> ]
(2018-04-05, 09:48)HydroDiOxide Wrote: [ -> ]Hi,

I love the add-on. It's working fine for me on my Libre-elec and linux boxes. However, in windows the add-on won't start. I'm getting a 'Trakt error' notification when starting Kodi, pointing to the log. Below is the error from the log:

https://paste.ubuntu.com/p/3BFYc3V48M/

Any idea what might be going wrong?
 Your six addon seems borked, maybe you got some funny repos installed? Anyway, reinstall six hopefully from the official repo. 

I downloaded the six addon from https://kodi-addons.club/addon/script.module.six/1.11.0 as a zip file. It installed fine, but the Trakt addon still isn't working.
(2018-04-12, 21:40)Razze Wrote: [ -> ]
(2018-04-12, 19:25)mgonzales Wrote: [ -> ]
(2018-04-11, 09:27)Razze Wrote: [ -> ]Synching is weird, are you sure you have no custom bindings done for that? It only happens if it's directly cal, which we don't do in the plugin - besides when you start the script manually from the options.

Haven't updated my machine in the last few days, will try to do later and see if I can replicate. Wouldn't be surprised if something goes wrong, as we are changing pretty big stuff at the minute.
I don't think I have any custom bindings set for Trakt to sync "manually".

I can start looking for something that does unbeknownst to me - what is the call to the Trakt add on for a manual sync so I can start grep and awk'ing for such a troublemaker.

Thanks

M     
 should be manualSync   

I looked and damn near disabled every add on I could think of but pretty consistently now trakt doesn't even try to rate or scrobble at playback end and instead of going crazy I decided in the interim to use kodi callback with a on playback end trigger run the following script:

python:

# -*- coding: utf-8 -*-

import xbmc

def __getMediaType():
    if xbmc.getCondVisibility('Container.Content(tvshows)'):
        return "show"
    elif xbmc.getCondVisibility('Container.Content(seasons)'):
        return "season"
    elif xbmc.getCondVisibility('Container.Content(episodes)'):
        return "episode"
    elif xbmc.getCondVisibility('Container.Content(movies)'):
        return "movie"
    else:
        return None
 
if not xbmc.getInfoLabel("ListItem.UserRating"):
    xbmc.executebuiltin("RunScript(script.trakt,action=rate,media_type=%s,dbid=%s)" % (__getMediaType(), xbmc.getInfoLabel("ListItem.DBID")))
now I can move past this obsessive episode and hobble along until normality returns Smile hehe

at least that covers rating requests for non-rated items (so far seems to work well)

QUESTION: what is a quick / easy way to call a scrobble manually?  (if there is one)

well..... actually I should turn on scrobble notification in Trakt to see if in fact that is the case - the debug logs did not show trakt attempting (via logger.debug message) to do so but doesn't mean that something else isn't (if there is a "something else").

As always - greatly appreciate your hard work with Trakt,  Kodi, etc.
and...
Thanks for your help! 🙃

Mario