fixed etag issue with music artists

This commit is contained in:
Marcel van der Veldt 2015-05-08 01:13:29 +02:00
parent e16cbcc87c
commit 0cb4d7fb25

View file

@ -68,11 +68,11 @@ class ReadEmbyDB():
def getMusicArtists(self, itemList = []): def getMusicArtists(self, itemList = []):
result = None result = []
doUtils = DownloadUtils() doUtils = DownloadUtils()
#only get basic info for our sync-compares #only get basic info for our sync-compares
url = "{server}/Artists?Fields=Name,CumulativeRunTimeTicks,Etag&Recursive=true&format=json" url = "{server}/Artists?Recursive=true&Fields=Etag,CumulativeRunTimeTicks&UserId={UserId}&format=json"
jsonData = doUtils.downloadUrl(url) jsonData = doUtils.downloadUrl(url)
if (jsonData == ""): if (jsonData == ""):
@ -80,7 +80,7 @@ class ReadEmbyDB():
if (jsonData[u'Items'] != ""): if (jsonData[u'Items'] != ""):
result = jsonData[u'Items'] result = jsonData[u'Items']
# Work around to only return items from the given list # Work around to only return items from the given list
if (result != None and len(result) > 0 and len(itemList) > 0): if (result != None and len(result) > 0 and len(itemList) > 0):
newResult = [] newResult = []
@ -147,7 +147,7 @@ class ReadEmbyDB():
result = None result = None
doUtils = DownloadUtils() doUtils = DownloadUtils()
url = "{server}/mediabrowser/Users/{UserId}/Items/%s?format=json&ImageTypeLimit=1" % id url = "{server}/mediabrowser/Users/{UserId}/Items/%s?format=json&ImageTypeLimit=1&Fields=Etag" % id
jsonData = doUtils.downloadUrl(url) jsonData = doUtils.downloadUrl(url)
if (jsonData != ""): if (jsonData != ""):