mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-12 06:18:03 -05:00
Fix for XBMC notifier when XBMC has no shows in library.
This commit is contained in:
parent
78c4211925
commit
bea999b639
@ -147,7 +147,9 @@ class XBMCNotifier:
|
|||||||
result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING)
|
result += curHost + ':' + notifyResult["result"].decode(sickbeard.SYS_ENCODING)
|
||||||
else:
|
else:
|
||||||
if sickbeard.XBMC_ALWAYS_ON or force:
|
if sickbeard.XBMC_ALWAYS_ON or force:
|
||||||
logger.log(u"Failed to detect XBMC version for '" + curHost + "', check configuration and try again.", logger.ERROR)
|
logger.log(
|
||||||
|
u"Failed to detect XBMC version for '" + curHost + "', check configuration and try again.",
|
||||||
|
logger.ERROR)
|
||||||
result += curHost + ':False'
|
result += curHost + ':False'
|
||||||
|
|
||||||
return result
|
return result
|
||||||
@ -432,9 +434,12 @@ class XBMCNotifier:
|
|||||||
# get tvshowid by showName
|
# get tvshowid by showName
|
||||||
showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","id":1}'
|
showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","id":1}'
|
||||||
showsResponse = self._send_to_xbmc_json(showsCommand, host)
|
showsResponse = self._send_to_xbmc_json(showsCommand, host)
|
||||||
if (showsResponse == False):
|
|
||||||
return False
|
if showsResponse and "result" in showsResponse and "tvshows" in showsResponse["result"]:
|
||||||
shows = showsResponse["result"]["tvshows"]
|
shows = showsResponse["result"]["tvshows"]
|
||||||
|
else:
|
||||||
|
logger.log(u"XBMC: No tvshows in XBMC TV show list", logger.DEBUG)
|
||||||
|
return False
|
||||||
|
|
||||||
for show in shows:
|
for show in shows:
|
||||||
if (show["label"] == showName):
|
if (show["label"] == showName):
|
||||||
@ -543,7 +548,9 @@ class XBMCNotifier:
|
|||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
if sickbeard.XBMC_ALWAYS_ON:
|
if sickbeard.XBMC_ALWAYS_ON:
|
||||||
logger.log(u"Failed to detect XBMC version for '" + host + "', check configuration and try again.", logger.ERROR)
|
logger.log(
|
||||||
|
u"Failed to detect XBMC version for '" + host + "', check configuration and try again.",
|
||||||
|
logger.ERROR)
|
||||||
result = result + 1
|
result = result + 1
|
||||||
|
|
||||||
# needed for the 'update xbmc' submenu command
|
# needed for the 'update xbmc' submenu command
|
||||||
|
Loading…
Reference in New Issue
Block a user