Actual: Work arround for ParetnId and Ids in the same query

This commit is contained in:
shaun 2015-04-03 19:38:51 +11:00
parent 7a22a1a60e
commit f90bda68cf

View file

@ -27,7 +27,8 @@ class ReadEmbyDB():
sortstring = "&SortBy=SortName" sortstring = "&SortBy=SortName"
else: else:
if(len(itemList) > 0): # if we want a certain list specify it if(len(itemList) > 0): # if we want a certain list specify it
sortstring = "&Ids=" + ",".join(itemList) #sortstring = "&Ids=" + ",".join(itemList)
sortstring = "" # work around for now until ParetnId and Id work together
else: # just get the last 20 created items else: # just get the last 20 created items
sortstring = "&Limit=20&SortBy=DateCreated" sortstring = "&Limit=20&SortBy=DateCreated"
@ -42,6 +43,14 @@ class ReadEmbyDB():
if(result.has_key('Items')): if(result.has_key('Items')):
result = result['Items'] result = result['Items']
# work around for now until ParetnId and Id work together
if(result != None and len(result) > 0 and len(itemList) > 0):
newResult = []
for item in result:
if(item.get("Id") in itemList):
newResult.append(item)
result = newResult
return result return result
def getMusicVideos(self, fullinfo = False, fullSync = True): def getMusicVideos(self, fullinfo = False, fullSync = True):