mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-12-25 02:06:09 +00:00
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"):
|
if(WINDOW.getProperty("updatePlayCounts_Running") == "true"):
|
||||||
utils.logMsg("Sync PlayCount", "updatePlayCounts Already Running", 0)
|
utils.logMsg("Sync PlayCount", "updatePlayCounts Already Running", 0)
|
||||||
return
|
return False
|
||||||
WINDOW.setProperty("updatePlayCounts_Running", "true")
|
WINDOW.setProperty("updatePlayCounts_Running", "true")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
@ -851,11 +851,7 @@ class LibrarySync():
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if(allMB3Movies == None):
|
if(allMB3Movies != None and allKodiMovies != None):
|
||||||
return False
|
|
||||||
|
|
||||||
if(allKodiMovies == None):
|
|
||||||
return False
|
|
||||||
|
|
||||||
if(pDialog != None):
|
if(pDialog != None):
|
||||||
progressTitle = "Sync PlayCounts: Processing " + view.get('title') + " " + str(viewCurrent) + " of " + str(viewCount)
|
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")
|
updated |= WriteKodiDB().updateProperty(kodiItem,"lastplayed",userData.get("LastPlayedDate"), "movie")
|
||||||
if(updated):
|
if(updated):
|
||||||
totalCountsUpdated += 1
|
totalCountsUpdated += 1
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@ -903,8 +900,7 @@ class LibrarySync():
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if (tvshowData == None):
|
if (tvshowData != None):
|
||||||
return False
|
|
||||||
|
|
||||||
showTotal = len(tvshowData)
|
showTotal = len(tvshowData)
|
||||||
showCurrent = 1
|
showCurrent = 1
|
||||||
|
@ -950,6 +946,7 @@ class LibrarySync():
|
||||||
updated |= WriteKodiDB().updateProperty(kodiItem,"lastplayed",userData.get("LastPlayedDate"), "episode")
|
updated |= WriteKodiDB().updateProperty(kodiItem,"lastplayed",userData.get("LastPlayedDate"), "episode")
|
||||||
if(updated):
|
if(updated):
|
||||||
totalCountsUpdated += 1
|
totalCountsUpdated += 1
|
||||||
|
|
||||||
if(self.ShouldStop(pDialog)):
|
if(self.ShouldStop(pDialog)):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue