mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
another fix
This commit is contained in:
parent
a513c01707
commit
2cab251517
1 changed files with 27 additions and 27 deletions
|
@ -433,34 +433,34 @@ class LibrarySync():
|
||||||
total = len(episodeData) + 1
|
total = len(episodeData) + 1
|
||||||
count = 0
|
count = 0
|
||||||
|
|
||||||
#we have to compare the lists somehow
|
#we have to compare the lists somehow
|
||||||
for item in episodeData:
|
for item in episodeData:
|
||||||
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
|
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
|
||||||
matchFound = False
|
matchFound = False
|
||||||
if kodiEpisodes != None:
|
if kodiEpisodes != None:
|
||||||
KodiItem = kodiEpisodes.get(comparestring1, None)
|
KodiItem = kodiEpisodes.get(comparestring1, None)
|
||||||
if(KodiItem != None):
|
if(KodiItem != None):
|
||||||
matchFound = True
|
matchFound = True
|
||||||
|
|
||||||
progressAction = "Checking"
|
progressAction = "Checking"
|
||||||
if not matchFound:
|
if not matchFound:
|
||||||
#no match so we have to create it
|
#no match so we have to create it
|
||||||
WriteKodiDB().addEpisodeToKodiLibrary(item)
|
WriteKodiDB().addEpisodeToKodiLibrary(item)
|
||||||
updateNeeded = True
|
updateNeeded = True
|
||||||
progressAction = "Adding"
|
progressAction = "Adding"
|
||||||
totalItemsAdded += 1
|
totalItemsAdded += 1
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# update progress bar
|
# update progress bar
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
percentage = int(((float(count) / float(total)) * 100))
|
percentage = int(((float(count) / float(total)) * 100))
|
||||||
pDialog.update(percentage, progressTitle, progressAction + " Episode: " + str(count))
|
pDialog.update(percentage, progressTitle, progressAction + " Episode: " + str(count))
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
showCurrent += 1
|
showCurrent += 1
|
||||||
|
|
||||||
#initiate library update and wait for finish before processing any updates
|
#initiate library update and wait for finish before processing any updates
|
||||||
if updateNeeded:
|
if updateNeeded:
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
|
|
Loading…
Reference in a new issue