fix for playcount sync when there are no movies set up in EMBY

This commit is contained in:
faush01 2015-03-30 15:08:47 +11:00
parent 0a3ad1988a
commit 69580c8ccd

View file

@ -818,7 +818,7 @@ class LibrarySync():
if(WINDOW.getProperty("updatePlayCounts_Running") == "true"):
utils.logMsg("Sync PlayCount", "updatePlayCounts Already Running", 0)
return
return False
WINDOW.setProperty("updatePlayCounts_Running", "true")
try:
@ -851,11 +851,7 @@ class LibrarySync():
if(self.ShouldStop(pDialog)):
return False
if(allMB3Movies == None):
return False
if(allKodiMovies == None):
return False
if(allMB3Movies != None and allKodiMovies != None):
if(pDialog != None):
progressTitle = "Sync PlayCounts: Processing " + view.get('title') + " " + str(viewCurrent) + " of " + str(viewCount)
@ -882,6 +878,7 @@ class LibrarySync():
updated |= WriteKodiDB().updateProperty(kodiItem,"lastplayed",userData.get("LastPlayedDate"), "movie")
if(updated):
totalCountsUpdated += 1
if(self.ShouldStop(pDialog)):
return False
@ -903,8 +900,7 @@ class LibrarySync():
if(self.ShouldStop(pDialog)):
return False
if (tvshowData == None):
return False
if (tvshowData != None):
showTotal = len(tvshowData)
showCurrent = 1
@ -950,6 +946,7 @@ class LibrarySync():
updated |= WriteKodiDB().updateProperty(kodiItem,"lastplayed",userData.get("LastPlayedDate"), "episode")
if(updated):
totalCountsUpdated += 1
if(self.ShouldStop(pDialog)):
return False