Jump to content

Get all TV Show ID's in Library?


EatSleepCodeDel
Go to solution Solved by AbOoOdY,

Recommended Posts

EatSleepCodeDel

Hi all!

I am looking for an API endpoint where I can list all IDs of TV Shows or Movies in a library. I have looked at the docs, swagger.emby.media, and Googled and can't find anything to enumerate this data.

For context, I want to develop a small companion tool to dynamically manage collections based on metadata of TV shows and movies. For this to work, I need to iterate over each show or movie in a library, parse the data and add matching items to collections.

Apologies in advance if this is an `ID10T` error. 😅

Thanks!

Link to comment
Share on other sites

hi, what have you done so far?

Link to comment
Share on other sites

EatSleepCodeDel

Not a whole lot currently. I have been using curl to validate endpoints and their schema. e.g.

curl -X GET "http://<IP-ADDRESS>:8096/emby/Shows/290934/Episodes?api_key=${EMBY_TOKEN}"

I have been able to get valid responses, so I know the API is accessible in my environment and I can validate against it. What I want (in an ideal world) would be able to hit an endpoint like:

curl -X GET "http://<IP-ADDRESS>:8096/emby/libraries/tv_shows/entries?api_key=${EMBY_TOKEN}"

and get a response like:

{
  "TV Shows" : 
    [
      {
        "Title" : "foo",
        "ID" : "1234",
        "Genre" : "Comedy",
        "Studio" : "HBO"
      },
      {
        "Title" : "bar",
        "ID" : "4321",
        "Genre" : "Drama",
        "Studio" : "Netflix"
      }
    ],
  "page" : 1,
  "pages_total": 15
}

A single API call per 'page' of library entries would be ideal. I could then enumerate over the pages and parse the data in weird and wonderful ways, but I know this may not be possible. I would be happy with a way to query what is in my TV Shows or Movies library and have it return the IDs of the shows and movies in them. Is this possible?

Thank you!

Link to comment
Share on other sites

hthgihwaymonk
Posted (edited)

I usually use the "GET /Users/{UserId}/Items" endpoint for this  

Edited by hthgihwaymonk
Link to comment
Share on other sites

Souhila121320
curl -X GET "http://<IP-ADDRESS>:8096/emby/libraries/tv_shows/entries?api_key=${EMBY_TOKEN}"

 

  • Disagree 1
Link to comment
Share on other sites

EatSleepCodeDel

Thanks for the suggestion, hthgihwaymonk. Unfortunately, that is not what I am after. I need to be able to get the IDs of each show or movie so I can then make calls to endpoints such as `/Shows/{Id}/Episodes`

Link to comment
Share on other sites

  • Solution
AbOoOdY

try this:

{emby_server_url}/emby/Items?ParentId={parent_id}&api_key={api_key}

Link to comment
Share on other sites

EatSleepCodeDel

Thank you very much, AbOoOdY! That did the trick!

  • Like 1
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...