From c680a7d0fe2d3a79960499eb97774feb2ce1ccbc Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 29 Mar 2015 22:18:05 +0200 Subject: [PATCH] fix for empty result crash --- resources/lib/LibrarySync.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index 6e3ede7e..f7defa6d 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -530,7 +530,10 @@ class LibrarySync(): for tvshow in allTVShows: episodeData = ReadEmbyDB().getEpisodes(tvshow,True) kodishow = allKodiTVShows.get(tvshow,None) - kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True) + if kodishow != None: + kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True) + else: + kodiEpisodes = None if(self.ShouldStop(pDialog)): return False