revert etag use as the API does not currently return the etag when

getting a collection of items (eg all episodes of a tv show).
This commit is contained in:
im85288 2015-05-02 17:16:33 +01:00
parent ba5211dcb8
commit bc09e570fd

View file

@ -124,19 +124,19 @@ class API():
# 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"))
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