From f90bda68cf1ae9b36164ff8a2aa02862fdcc0e48 Mon Sep 17 00:00:00 2001 From: shaun Date: Fri, 3 Apr 2015 19:38:51 +1100 Subject: [PATCH] Actual: Work arround for ParetnId and Ids in the same query --- resources/lib/ReadEmbyDB.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/resources/lib/ReadEmbyDB.py b/resources/lib/ReadEmbyDB.py index 3175e9f8..1c52826a 100644 --- a/resources/lib/ReadEmbyDB.py +++ b/resources/lib/ReadEmbyDB.py @@ -27,7 +27,8 @@ class ReadEmbyDB(): sortstring = "&SortBy=SortName" else: 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 sortstring = "&Limit=20&SortBy=DateCreated" @@ -42,6 +43,14 @@ class ReadEmbyDB(): if(result.has_key('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 def getMusicVideos(self, fullinfo = False, fullSync = True):