Jump to content

Artist, Genre, Studio + Limit


speechles

Recommended Posts

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 by speechles
Link to comment
Share on other sites

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...