Jump to content

c# how do I get a list of only AudioBooks in the library?


mickle026

Recommended Posts

mickle026

I am trying to work this out, but cannot seem to fathom it correctly - what is the correct way to get only audiobooks?

I though it would be "AudioBook" in internal items query, but it doesn't appear to exist and I get everything in the whole library with that

Audio exists, Book exists, but AudioBook doesn't appear to?

xAudioBook = libraryManager.GetItemTypes(new InternalItemsQuery
                {
                    IncludeItemTypes = new[] { "Audio" },
                    ParentType = MediaType.Book,
                }) ;

with this I get them but I get every track too, I just want the main library item, ie the album.

 

I would also like to know the correct remote  metadata interface

Is it this, with mediatype.Audio  ?

public class MyAudioBookApiProvider : IRemoteMetadataProvider<Book, BookInfo>, IRemoteImageProvider, IService

as this doesn't seem to exist

public class MyAudioBookApiProvider : IRemoteMetadataProvider<AudioBook, SongInfo>, IRemoteImageProvider, IService

 

Edited by mickle026
Link to comment
Share on other sites

Hi, for a provider, you would just do a MusicAlbum provider, and then it's up to the user to enable it or not on their audio libraries.

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