fixed etag issue with music artists
This commit is contained in:
parent
e16cbcc87c
commit
0cb4d7fb25
1 changed files with 4 additions and 4 deletions
|
@ -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 != ""):
|
||||||
|
|
Loading…
Reference in a new issue