remove some redundant code calls and do a shouldstop call in the add loop

This commit is contained in:
shaun 2015-04-05 09:59:15 +10:00
commit 25286717b3
2 changed files with 15 additions and 9 deletions

View file

@ -74,6 +74,7 @@ class LibrarySync():
finally:
WINDOW.setProperty("SyncDatabaseRunning", "false")
utils.logMsg("Sync DB", "syncDatabase Exiting", 0)
cursor.close()
return True
@ -448,6 +449,10 @@ class LibrarySync():
count = 0
for item in episodeData:
if(self.ShouldStop(pDialog)):
return False
progressAction = "Adding"
WriteKodiDB().addEpisodeToKodiLibrary(item, connection, cursor)