speechles 1921 Posted September 17, 2016 Share Posted September 17, 2016 (edited) Suppose you wanted to get a list of tracks from an artist. Suppose the artist has 5,000 songs. How does one limit this, it is acting like limit isnt an option? This also happens on genres and studios for music. For example, here is artist. There is a preference to change the limit. It does not work it appears limit isnt respected in my query. It is woefully abandoned. url = GetServerBaseUrl() + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items" limit = FirstOf(RegRead("prefgenrestudio"),"200") ' Query query = { artists: artistName recursive: "true" includeitemtypes: "Audio" fields: "AudioInfo,PrimaryImageAspectRatio,DateCreated,Overview,Genres" sortby: "SortName" sortorder: "Ascending", ImageTypeLimit: "1" } if limit <> "0" then query.addreplace("limit", limit)Here is genre, same issue.url = GetServerBaseUrl() + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items" limit = FirstOf(RegRead("prefgenrestudio"),"200") ' Query query = { genres: genre recursive: "true" includeitemtypes: "Audio" fields: "AudioInfo,PrimaryImageAspectRatio,DateCreated,Overview,Genres" sortby: "SortName" sortorder: "Ascending", ImageTypeLimit: "1" } if limit <> "0" then query.addreplace("limit", limit)And finally the studios for music...url = GetServerBaseUrl() + "/Users/" + HttpEncode(getGlobalVar("user").Id) + "/Items" limit = FirstOf(RegRead("prefgenrestudio"),"200") ' Query query = { studios: studio recursive: "true" includeitemtypes: "Audio" fields: "AudioInfo,PrimaryImageAspectRatio,DateCreated,Overview,Genres" sortby: "SortName" sortorder: "Ascending", ImageTypeLimit: "1" } if limit <> "0" then query.addreplace("limit", limit)@@Luke is there some reason why these endpoints don't respect limit? Can it be enabled for these pllleeeaassseee... I want to use limit with artists/genres/studios. Thanks It is possible to just accept them all, and cut them down myself to the limit, but the time spent grab all those just to cull them is very painful. Edited September 17, 2016 by speechles Link to comment Share on other sites More sharing options...
Luke 37166 Posted September 18, 2016 Share Posted September 18, 2016 Can you compare to the web client? they do support it. thanks. Link to comment Share on other sites More sharing options...
speechles 1921 Posted September 18, 2016 Author Share Posted September 18, 2016 Can you compare to the web client? they do support it. thanks.Word. It needs &startindex=0 in addition to limit, indeed noted for the future. Confirmed that does work, thanks. Sent from my Nexus 7 using Tapatalk Link to comment Share on other sites More sharing options...
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