fix for playcount sync when there are no movies set up in EMBY
This commit is contained in:
parent
0a3ad1988a
commit
69580c8ccd
1 changed files with 88 additions and 91 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue