mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
some more nonetype fixes
This commit is contained in:
parent
7481023bd8
commit
9a17eab206
1 changed files with 17 additions and 12 deletions
|
@ -516,7 +516,10 @@ class LibrarySync():
|
||||||
for item in tvShowData:
|
for item in tvShowData:
|
||||||
if item.get('IsFolder'):
|
if item.get('IsFolder'):
|
||||||
|
|
||||||
|
if allKodiTVShows != None:
|
||||||
kodishow = allKodiTVShows.get(item["Id"],None)
|
kodishow = allKodiTVShows.get(item["Id"],None)
|
||||||
|
else:
|
||||||
|
kodishow = None
|
||||||
|
|
||||||
if(kodishow != None):
|
if(kodishow != None):
|
||||||
updated = WriteKodiDB().updateTVShowToKodiLibrary(item,kodishow)
|
updated = WriteKodiDB().updateTVShowToKodiLibrary(item,kodishow)
|
||||||
|
@ -536,11 +539,12 @@ class LibrarySync():
|
||||||
showCurrent = 1
|
showCurrent = 1
|
||||||
for tvshow in allTVShows:
|
for tvshow in allTVShows:
|
||||||
episodeData = ReadEmbyDB().getEpisodes(tvshow,True)
|
episodeData = ReadEmbyDB().getEpisodes(tvshow,True)
|
||||||
|
|
||||||
|
kodiEpisodes = None
|
||||||
|
if allKodiTVShows != None:
|
||||||
kodishow = allKodiTVShows.get(tvshow,None)
|
kodishow = allKodiTVShows.get(tvshow,None)
|
||||||
if kodishow != None:
|
if kodishow != None:
|
||||||
kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True)
|
kodiEpisodes = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],True,True)
|
||||||
else:
|
|
||||||
kodiEpisodes = None
|
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
@ -578,6 +582,7 @@ class LibrarySync():
|
||||||
|
|
||||||
#add all kodi episodes to a list with episodes for use later on to delete episodes
|
#add all kodi episodes to a list with episodes for use later on to delete episodes
|
||||||
#the mediabrowser ID is set as uniqueID in the NFO... for some reason this has key 'unknown' in the json response
|
#the mediabrowser ID is set as uniqueID in the NFO... for some reason this has key 'unknown' in the json response
|
||||||
|
if kodishow != None:
|
||||||
show = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],False,False)
|
show = ReadKodiDB().getKodiEpisodes(kodishow["tvshowid"],False,False)
|
||||||
if show != None:
|
if show != None:
|
||||||
for episode in show:
|
for episode in show:
|
||||||
|
|
Loading…
Reference in a new issue