Fix TypeError when navigating

- Fixes #398
This commit is contained in:
croneter 2018-02-06 20:26:10 +01:00
parent 0d5d35c263
commit a9fb2e127e

View file

@ -363,7 +363,7 @@ def get_tv_shows(params):
"""
ret = JsonRPC('VideoLibrary.GetTVShows').execute(params)
try:
ret['result']['tvshows']
ret = ret['result']['tvshows']
except (KeyError, TypeError):
ret = []
return ret
@ -375,7 +375,7 @@ def get_episodes(params):
"""
ret = JsonRPC('VideoLibrary.GetEpisodes').execute(params)
try:
ret['result']['episodes']
ret = ret['result']['episodes']
except (KeyError, TypeError):
ret = []
return ret