2016-05-09, 00:13
(2016-05-07, 18:05)FriedLocust Wrote:(2016-05-06, 10:51)Razze Wrote:Uh, never tried it this way. I am only only a user.(2016-05-03, 19:16)FriedLocust Wrote: Sorry for delay.
http://xbmclogs.com/pjmkuw95k
Are you able to test from github? If so can you try https://github.com/Razzeee/script.trakt/...en-refresh
And let me know how/if it's working?
The zip in https://github.com/Razzeee/script.trakt/zipball/master has the fix-tokenm refresh in it?
Or copy
PHP Code:secret=self.__client_secret
)
+ # Bind event
+ Trakt.on('oauth.token_refreshed', self.on_token_refreshed)
+
+ Trakt.configuration.defaults.oauth(
+ refresh=True
+ )
+
if getSetting('authorization') and not force:
self.authorization = loads(getSetting('authorization'))
else:
@@ -118,6 +125,13 @@ def on_poll(self, callback):
# Continue polling
callback(True)
+ def on_token_refreshed(self, response):
+ # OAuth token refreshed, save token for future calls
+ self.authorization = response
+ setSetting('authorization', dumps(self.authorization))
+
+ logger.debug('Token refreshed')
+
def updateUser(self):
user = self.getUser()
if user and 'user' in user:
into traktapi.py and overwrite it on my kodi-box?
both ways should work, whatever is easier for you.