another fix

This commit is contained in:
Marcel van der Veldt 2015-03-25 13:31:19 +01:00
parent a513c01707
commit 2cab251517

View file

@ -433,33 +433,33 @@ class LibrarySync():
total = len(episodeData) + 1
count = 0
#we have to compare the lists somehow
for item in episodeData:
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
matchFound = False
if kodiEpisodes != None:
KodiItem = kodiEpisodes.get(comparestring1, None)
if(KodiItem != None):
matchFound = True
#we have to compare the lists somehow
for item in episodeData:
comparestring1 = str(item.get("ParentIndexNumber")) + "-" + str(item.get("IndexNumber"))
matchFound = False
if kodiEpisodes != None:
KodiItem = kodiEpisodes.get(comparestring1, None)
if(KodiItem != None):
matchFound = True
progressAction = "Checking"
if not matchFound:
#no match so we have to create it
WriteKodiDB().addEpisodeToKodiLibrary(item)
updateNeeded = True
progressAction = "Adding"
totalItemsAdded += 1
progressAction = "Checking"
if not matchFound:
#no match so we have to create it
WriteKodiDB().addEpisodeToKodiLibrary(item)
updateNeeded = True
progressAction = "Adding"
totalItemsAdded += 1
if(self.ShouldStop(pDialog)):
return True
if(self.ShouldStop(pDialog)):
return True
# update progress bar
if(pDialog != None):
percentage = int(((float(count) / float(total)) * 100))
pDialog.update(percentage, progressTitle, progressAction + " Episode: " + str(count))
count += 1
# update progress bar
if(pDialog != None):
percentage = int(((float(count) / float(total)) * 100))
pDialog.update(percentage, progressTitle, progressAction + " Episode: " + str(count))
count += 1
showCurrent += 1
showCurrent += 1
#initiate library update and wait for finish before processing any updates
if updateNeeded: