From 39b3fd9523552b92e8068ae99bab86667f0a0273 Mon Sep 17 00:00:00 2001 From: Marcel van der Veldt Date: Sun, 29 Mar 2015 19:33:41 +0200 Subject: [PATCH] fix error when no tvshows added yet --- resources/lib/LibrarySync.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/resources/lib/LibrarySync.py b/resources/lib/LibrarySync.py index 55e73d53..6e3ede7e 100644 --- a/resources/lib/LibrarySync.py +++ b/resources/lib/LibrarySync.py @@ -438,8 +438,11 @@ class LibrarySync(): episodeData = ReadEmbyDB().getEpisodes(tvshow,True) allKodiTVShows = ReadKodiDB().getKodiTvShows(False) - kodishow = allKodiTVShows.get(tvshow,None) - kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True) + if allKodiTVShows != None: + kodishow = allKodiTVShows.get(tvshow,None) + kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True) + else: + kodiEpisodes = None if episodeData != None: