From a9fb2e127e7dcbf45bf407a82ba376dc099841f0 Mon Sep 17 00:00:00 2001 From: croneter Date: Tue, 6 Feb 2018 20:26:10 +0100 Subject: [PATCH] Fix TypeError when navigating - Fixes #398 --- resources/lib/json_rpc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/resources/lib/json_rpc.py b/resources/lib/json_rpc.py index 9e1df360..82a96b40 100644 --- a/resources/lib/json_rpc.py +++ b/resources/lib/json_rpc.py @@ -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