File tree Expand file tree Collapse file tree
resources/lib/twitch_addon/addon Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" standalone =" yes" ?>
2- <addon id =" plugin.video.twitch" version =" 2.6.0~beta2 " name =" Twitch" provider-name =" anxdpanic, A Talented Community" >
2+ <addon id =" plugin.video.twitch" version =" 2.6.0~beta3 " name =" Twitch" provider-name =" anxdpanic, A Talented Community" >
33 <requires >
44 <import addon =" xbmc.python" version =" 2.20.0" />
55 <import addon =" script.module.six" version =" 1.11.0" />
Original file line number Diff line number Diff line change @@ -337,23 +337,24 @@ def error_check(results):
337337 if isinstance (results , list ):
338338 return results
339339
340- if ('error' in results .get ('response' , {})) and (results ['response' ]['status' ] == 401 ):
340+ payload = results .copy ()
341+ if 'response' in payload :
342+ payload = payload ['response' ]
343+
344+ if ('error' in payload ) and (payload ['status' ] == 401 ):
341345 _ = kodi .Dialog ().ok (
342346 i18n ('oauth_heading' ),
343347 i18n ('oauth_message' ) % (i18n ('settings' ), i18n ('login' ), i18n ('get_oauth_token' ))
344348 )
345349 sys .exit ()
346350
347- if 'stream' in results and results ['stream' ] is None :
351+ if 'stream' in payload and payload ['stream' ] is None :
348352 raise PlaybackFailed ()
349353
350- if 'error' in results .get ('response' , {}):
351- raise TwitchException (results )
352-
353- if 'response' in results :
354- return results ['response' ]
354+ if 'error' in payload :
355+ raise TwitchException (payload )
355356
356- return results
357+ return payload
357358
358359 @staticmethod
359360 def return_boolean (results ):
You can’t perform that action at this time.
0 commit comments