use the etag when available

This commit is contained in:
im85288 2015-05-02 15:34:59 +01:00
parent d489375ab2
commit e6784de347

View file

@ -120,9 +120,13 @@ 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 = ""
if item.get("Etag") != None:
checksum = item.get("Etag")
else:
userData = item.get("UserData")
if(userData != None):
checksum += str(userData.get("Played"))