Merge branch 'database_changes' of https://github.com/MediaBrowser/Emby.Kodi into database_changes
This commit is contained in:
commit
702eec810a
1 changed files with 16 additions and 12 deletions
|
@ -120,19 +120,23 @@ class API():
|
||||||
}
|
}
|
||||||
|
|
||||||
def getChecksum(self, item):
|
def getChecksum(self, item):
|
||||||
#TODO --> use the etags or serverside checksum for this
|
# use the etags or serverside checksum for this if available
|
||||||
# for now we just add some fields to a string
|
# else just add some fields to a string
|
||||||
checksum = ""
|
checksum = ""
|
||||||
userData = item.get("UserData")
|
|
||||||
if(userData != None):
|
if item.get("Etag") != None:
|
||||||
checksum += str(userData.get("Played"))
|
checksum = item.get("Etag")
|
||||||
checksum += str(userData.get("IsFavorite"))
|
else:
|
||||||
if userData.get('UnplayedItemCount') != None:
|
userData = item.get("UserData")
|
||||||
checksum += str(userData.get("UnplayedItemCount"))
|
if(userData != None):
|
||||||
if userData.get('LastPlayedDate') != None:
|
checksum += str(userData.get("Played"))
|
||||||
checksum += str(userData.get("LastPlayedDate"))
|
checksum += str(userData.get("IsFavorite"))
|
||||||
if userData.get('PlaybackPositionTicks') != None:
|
if userData.get('UnplayedItemCount') != None:
|
||||||
checksum += str(userData.get("PlaybackPositionTicks"))
|
checksum += str(userData.get("UnplayedItemCount"))
|
||||||
|
if userData.get('LastPlayedDate') != None:
|
||||||
|
checksum += str(userData.get("LastPlayedDate"))
|
||||||
|
if userData.get('PlaybackPositionTicks') != None:
|
||||||
|
checksum += str(userData.get("PlaybackPositionTicks"))
|
||||||
|
|
||||||
return checksum
|
return checksum
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue