TeamB 2414 Posted June 30, 2021 Posted June 30, 2021 (edited) @Luke I have a situation where I have 2 queries, one with ParentId and one without ParentId, apart from that they are exactly the same query. The one without ParentId is only returning 3 Items, the one with ParentId returns the full limit count of 20 items. With ParentId, this one return 20 items as expected http://<IP_ADDRESS>:8096/emby/Users/<USER_ID>/Items/Latest ?IncludeItemTypes=Episode &IsMissing=False &ImageTypeLimit=1 &Limit=20 &Recursive=True &format=json &Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,Overview &SortOrder=Descending &ParentId=<VIEW ID OF TV SHOWS LIB> &SortBy=DateCreated &api_key=<API_KEY> Without ParentId, this one only return 3 items http://<IP_ADDRESS>:8096/emby/Users/<USER_ID>/Items/Latest ?IncludeItemTypes=Episode &IsMissing=False &ImageTypeLimit=1 &Limit=20 &Recursive=True &format=json &Fields=DateCreated,EpisodeCount,SeasonCount,Path,Genres,Studios,Etag,Taglines,SortName,RecursiveItemCount,ChildCount,ProductionLocations,CriticRating,OfficialRating,CommunityRating,PremiereDate,ProductionYear,AirTime,Status,Tags,MediaStreams,Overview &SortOrder=Descending &SortBy=DateCreated &api_key=<API_KEY> As you can see the only difference is the ParentId I am not sure what is going on here, this used to work at some point otherwise I would not have have added it, I have not recently hanged anything, this has been in EmbyCon for over a year. Any ideas? What I expect is the one without the parent id to still show all the 20 items as I am asking for global and not restricting it to just a parent. It should show the same list as the one with the parent as I only have one TV Show lib. Edited June 30, 2021 by TeamB
ebr 15664 Posted June 30, 2021 Posted June 30, 2021 Curious - what three items are returned? That call would never be used without a parent ID in our apps so that's probably why this fell through the cracks if it did.
Luke 40070 Posted June 30, 2021 Posted June 30, 2021 Actually I think it's because the results are grouped and the grouping is happening after the limit being applied.
ebr 15664 Posted June 30, 2021 Posted June 30, 2021 3 minutes ago, Luke said: Actually I think it's because the results are grouped and the grouping is happening after the limit being applied. That's what I suspected possibly as well and why I asked what the items were. Expected them to be TV Series possibly.
rodainas 188 Posted June 30, 2021 Posted June 30, 2021 @ebr thats correct The example of whats happening is here https://emby.media/community/index.php?/topic/78547-embycon-kodi-add-on/&do=findComment&comment=1040027
TeamB 2414 Posted June 30, 2021 Author Posted June 30, 2021 Yeah I think it is grouping and limiting before the grouping takes place. You can see I have a lot of new episodes in the first 3 items of the latest TV Shows However when I use the API WITH a Parent ID I get the full list So it does work but only with a parent ID??
Luke 40070 Posted July 1, 2021 Posted July 1, 2021 It needs to be improved to group before the limit, not after. It works better with a parent id because the grouping mechanism is a little different per content type, and the parent id allows a more specific method to be used as opposed to a generic one.
TeamB 2414 Posted July 1, 2021 Author Posted July 1, 2021 9 hours ago, Luke said: It needs to be improved to group before the limit, not after. It works better with a parent id because the grouping mechanism is a little different per content type, and the parent id allows a more specific method to be used as opposed to a generic one. Do you think this is likely to improve or should I implement a workaround?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now