Jump to content

Getting latest MusicAlbum through the API only ever returns 1 result if a ParentId is passed in


Recommended Posts

Posted

I'm honestly not sure if this is a bug or a feature, but making an API call (using Postman) like this:

Items/Latest?Limit=10&EnableImageTypes=Primary&X-Emby-Token=XXXXXX&IncludeItemTypes=MusicAlbum&ParentId=XXXXXX

Returns only one result, whereas this:

Items/Latest?Limit=10&EnableImageTypes=Primary&X-Emby-Token=XXXXXX&IncludeItemTypes=MusicAlbum

Returns 10 results as expected. It should be noted that there is only one Audio library in my testing server so it can't be pulling from a different ParentId (ParentId in this case is the Id of the Library Folder).

For now I am using the ItemsQuery with Sorting to accomplish the same thing:

Items?Fields=PrimaryImageAspectRatio%2CBasicSyncInfo%2CDateCreated&ParentId=XXXXXX&EnableImageTypes=Primary&X-Emby-Token=XXXXXX&Recursive=true&IncludeItemTypes=MusicAlbum&Limit=10&SortBy=DateCreated&SortOrder=Descending

Just wondered if this was intended behavior.

Thanks!

Posted

Hi, try removing the IncludeItemTypes=MusicAlbum as that's not media. The latest items endpoint will group them into albums anyway.

Posted

Thanks for the quick reply!

That is kind of true... It seems to return a random audio track from each album, which is less useful for my use case which is centered around audiobooks where the track is less important than the Folder/Album. I just thought it was odd that the Latest endpoint almost works for MusicAlbum.

That's cool though I can use the Item query.

Again thanks for your time 😀

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...