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)
|
||||
else:
|
||||
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'
|
||||
|
||||
return result
|
||||
@ -432,9 +434,12 @@ class XBMCNotifier:
|
||||
# get tvshowid by showName
|
||||
showsCommand = '{"jsonrpc":"2.0","method":"VideoLibrary.GetTVShows","id":1}'
|
||||
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"]
|
||||
else:
|
||||
logger.log(u"XBMC: No tvshows in XBMC TV show list", logger.DEBUG)
|
||||
return False
|
||||
|
||||
for show in shows:
|
||||
if (show["label"] == showName):
|
||||
@ -543,7 +548,9 @@ class XBMCNotifier:
|
||||
return True
|
||||
else:
|
||||
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
|
||||
|
||||
# needed for the 'update xbmc' submenu command
|
||||
|
Loading…
Reference in New Issue
Block a user