mirror of
https://github.com/jellyfin/jellyfin-kodi.git
synced 2024-11-10 04:06:11 +00:00
use the etag when available
This commit is contained in:
parent
d489375ab2
commit
e6784de347
1 changed files with 16 additions and 12 deletions
|
@ -120,19 +120,23 @@ class API():
|
|||
}
|
||||
|
||||
def getChecksum(self, item):
|
||||
#TODO --> use the etags or serverside checksum for this
|
||||
# for now we just add some fields to a string
|
||||
# use the etags or serverside checksum for this if available
|
||||
# else just add some fields to a string
|
||||
checksum = ""
|
||||
userData = item.get("UserData")
|
||||
if(userData != None):
|
||||
checksum += str(userData.get("Played"))
|
||||
checksum += str(userData.get("IsFavorite"))
|
||||
if userData.get('UnplayedItemCount') != None:
|
||||
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"))
|
||||
|
||||
if item.get("Etag") != None:
|
||||
checksum = item.get("Etag")
|
||||
else:
|
||||
userData = item.get("UserData")
|
||||
if(userData != None):
|
||||
checksum += str(userData.get("Played"))
|
||||
checksum += str(userData.get("IsFavorite"))
|
||||
if userData.get('UnplayedItemCount') != None:
|
||||
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
|
||||
|
||||
|
|
Loading…
Reference in a new issue