mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-26 02:36:10 +00:00
optimise getting kodi movie and kodi episode
This commit is contained in:
parent
371672d56f
commit
310b647727
1 changed files with 2 additions and 14 deletions
|
@ -630,7 +630,7 @@ class LibrarySync():
|
||||||
#process movie
|
#process movie
|
||||||
if type=='Movie':
|
if type=='Movie':
|
||||||
MB3Movie = ReadEmbyDB().getItem(itemID)
|
MB3Movie = ReadEmbyDB().getItem(itemID)
|
||||||
allKodiMovies = ReadKodiDB().getKodiMovies(False)
|
kodiItem = ReadKodiDB().getKodiMovie(itemID)
|
||||||
|
|
||||||
if(self.ShouldStop()):
|
if(self.ShouldStop()):
|
||||||
return True
|
return True
|
||||||
|
@ -641,12 +641,6 @@ class LibrarySync():
|
||||||
if(allKodiMovies == None):
|
if(allKodiMovies == None):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
kodiItem = None
|
|
||||||
for kodimovie in allKodiMovies:
|
|
||||||
if itemID in kodimovie["file"]:
|
|
||||||
kodiItem = kodimovie
|
|
||||||
break
|
|
||||||
|
|
||||||
userData=API().getUserData(MB3Movie)
|
userData=API().getUserData(MB3Movie)
|
||||||
timeInfo = API().getTimeInfo(MB3Movie)
|
timeInfo = API().getTimeInfo(MB3Movie)
|
||||||
if kodiItem != None:
|
if kodiItem != None:
|
||||||
|
@ -666,14 +660,8 @@ class LibrarySync():
|
||||||
return True
|
return True
|
||||||
|
|
||||||
MB3Episode = ReadEmbyDB().getItem(itemID)
|
MB3Episode = ReadEmbyDB().getItem(itemID)
|
||||||
kodiEpisodes = ReadKodiDB().getKodiEpisodes(MB3Episode.get("SeriesId"),False)
|
kodiItem = ReadKodiDB().getKodiEpisodeByMbItem(MB3Episode)
|
||||||
if (MB3Episode != None):
|
if (MB3Episode != None):
|
||||||
kodiItem = None
|
|
||||||
comparestring1 = str(MB3Episode.get("ParentIndexNumber")) + "-" + str(MB3Episode.get("IndexNumber"))
|
|
||||||
matchFound = False
|
|
||||||
if kodiEpisodes != None:
|
|
||||||
kodiItem = kodiEpisodes.get(comparestring1, None)
|
|
||||||
|
|
||||||
userData=API().getUserData(MB3Episode)
|
userData=API().getUserData(MB3Episode)
|
||||||
timeInfo = API().getTimeInfo(MB3Episode)
|
timeInfo = API().getTimeInfo(MB3Episode)
|
||||||
if kodiItem != None:
|
if kodiItem != None:
|
||||||
|
|
Loading…
Reference in a new issue