Jump to content

emby API


Recommended Posts

Jdiesel

@@mrmc I haven't tried MrMC in a few months now but the reason I haven't been using it is that there was no support for external https connections to Emby servers. Is this on the roadmap? 

Link to post
Share on other sites
Jdiesel

We added it already, can't remember if it's in the released v3.6.2 or the brewing v.3.7.0

Thanks I'll have another look

Link to post
Share on other sites
  • 1 year later...

Hi Luke,

is Filtering depreciated in latest stable and Betas? GET /Items/Filters returns nothing for us on  4.2 and >

Seems you are on your own, finding this out with the Emby API  :mellow:

Already have sent the Emby devs a PM, to remind them to give some TLC here :rolleyes:

Link to post
Share on other sites

I apologize for the delay. The newer pattern is just to request the filters individually, rather than having to use a custom filters endpoint. I will write up documentation, but in the meantime, if you pop open the chrome debugger and follow the network tab, then open the filter dialog in the web app, you can see the requests to get lists of:

 

  • genres
  • tags
  • studios
  • ratings
  • years
  • containers

and others.

 

The great thing about this is that you can use the regular /items endpoint that you are already familiar with to retrieve these lists. Just take note of the params used to eliminate data that you don't need in the filter dialog, this will ensure the requests are completing as quickly as possible.

 

Please let me know if i can answer anything else. Thanks.

  • Like 1
Link to post
Share on other sites
  • 2 months later...
kingargyle

I apologize for the delay. The newer pattern is just to request the filters individually, rather than having to use a custom filters endpoint. I will write up documentation, but in the meantime, if you pop open the chrome debugger and follow the network tab, then open the filter dialog in the web app, you can see the requests to get lists of:

 

  • genres
  • tags
  • studios
  • ratings
  • years
  • containers

and others.

 

The great thing about this is that you can use the regular /items endpoint that you are already familiar with to retrieve these lists. Just take note of the params used to eliminate data that you don't need in the filter dialog, this will ensure the requests are completing as quickly as possible.

 

Please let me know if i can answer anything else. Thanks.

 

 

Alright running into this, and I'm assuming that it is the GenreService that needs to be used now.   Is there any detail example, as I'm getting all the genre's not just the ones available for the Parent Id.   The old FilterService would just give me the ones available for the particular ParentId.

Link to post
Share on other sites
kingargyle

Alright running into this, and I'm assuming that it is the GenreService that needs to be used now.   Is there any detail example, as I'm getting all the genre's not just the ones available for the Parent Id.   The old FilterService would just give me the ones available for the particular ParentId.

 

Alright I think I have the minimum that is necessary to get the same functionality as the old FilterService using the GenreService.  The following is Retrofit 2  settings that seem to work:

@GET("/emby/Genres?EnableUserData=false&SortBy=SortName&SortOrder=Ascending&EnableTotalRecordCount=false&EnableImages=false")
fun availableFilters(
@HeaderMap headerMap: Map<String, String>,
@Query("userId") userId: String,
@Query("ParentId") itemId: String? = null,
@Query("Recursive") recursive: Boolean = true
): Call<QueryFilters>

This is based off the network calls for the Filter page.

 

EnableUserData - false = filters out any of the user data

SortBy=SortName&SortOrder=Ascending = sorts the results alphabetically.

EnableRecordCount=false - Disables the record count grouping.

EnableImages=false - excludes the primary image and backdrop images associated with genre.

 

Everything else is the same, ParentId seems to be enough to filter by what is available within that parent.

 

Hopefully this helps some else out.

Link to post
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...