Jump to content

Chapter API error


Go to solution Solved by TeamB,

Recommended Posts

kevinnashuk
Posted

When I browse other folders, my music folders show up too.

Here are my music folders, showing as expected  @TeamB

image.png.da25128c50159329d9e50910c983d90e.png

Now if I browse my Films folder, the films are showing, but the music is too

image.png.ee2655ae5fb710427bf8f94bef943572.png

Same with TV shows

image.png.2d5ec71030e113e955b34e96a5f6c33e.png

Posted (edited)

yeah it looks like something is very screwed up with this now, everything is merging.

I will have a look and see what I can find.

Edited by TeamB
Posted

@LukeAny idea why MusicAlbums has a parentID of zero (server version 4.8.11.0)

and why they would be returning in an 
 

InternalItemsQuery query = new InternalItemsQuery();
query.ParentIds = new long[] { request.parent };
BaseItem[] results = _libraryManager.GetItemList(query);

 

Posted

Music albums are not part of the folder structure. They're virtualized containers built using metadata. What are you trying to do?

Posted (edited)
5 hours ago, Luke said:

Music albums are not part of the folder structure. They're virtualized containers built using metadata. What are you trying to do?

But why dont they have any ParentID? Their parent ID is 0 (zero).

The root cause of the issue I am seeing is the above query returns all the items with a ParentId of 0 (zero) even if I specify a filter of ParentIDs = X

so for example:

query.ParentIds = new long[] { 463 };

Which is a library of Movies, all Movies in that libray BUT also all the Albums from everywhere also get returned. Basically anything with a ParentId of 463 and also with a ParentId of 0 are returned.

 

Edited by TeamB
Posted

@Luke So if Albums don't have a parent then how do I use:

query.ParentIds = new long[] { request.parent };

to limit just albums from a particular library?

Posted

Try setting query.IncludeItemTypes = MusicAlbum and Recursive=true

Unless you are doing generic folder browsing, then just about all queries should have Recursive=true attached. 

 

  • Solution
Posted

I did try that.

The problem I have is that all MusicAlbum for ALL libraries are returned not just the library I set as the query.ParentIds

Anyway for now I have run out of time and am just removing MusicAlbum as a supported type.

  • Thanks 1
kevinnashuk
Posted

Just checked, now I can browse films and tv shows correctly, which are the only things I need to see and edit using Chapter API.

Thank you

  • Thanks 1

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