Jump to content

Get TV show ID by name


ArthurAttout
Go to solution Solved by PenkethBoy,

Recommended Posts

ArthurAttout

I'd like to write a script that calls my Emby server's API.

This script should do some stuffs with the subtitles of a specific episode of a given TV show.

 

How can I get the ID of a show based on its name ?

 

Alternatively, is there a way I can browse the local Emby DB for debugging purposes ?

 

Thanks !

Link to comment
Share on other sites

Hi, best way to do this is to the the /items api with the searchterm param.

 

Yes you could use a sqlite browser app to browse the DB files, although I would suggest using the api instead

Link to comment
Share on other sites

ArthurAttout

Hi, best way to do this is to the the /items api with the searchterm param.

 

Yes you could use a sqlite browser app to browse the DB files, although I would suggest using the api instead

Do you have any curl example for that ?

 

http://localhost:8096/emby/Items?api_key=f52d385408...7c4&searchterm=South%20Park

 

Does not yeld any items although I have "South Park" in my collection

Edited by ArthurAttout
Link to comment
Share on other sites

PenkethBoy

go to your server dashboard and at the bottom is an api link to swagger which will allow you to test/try your api calls

Link to comment
Share on other sites

ArthurAttout

go to your server dashboard and at the bottom is an api link to swagger which will allow you to test/try your api calls

 

 

Our api wiki can also be found here:

https://github.com/MediaBrowser/Emby/wiki

Thanks.

I attempted it from the swagger UI, with no luck. Specifying any searchterm param systematically returns an empty list.

http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=South
http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=South%20Park   <-- with \%20 url-encoded
http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=South Park 
http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=Park
http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=Sou
http://localhost:8096/emby/Items?api_key=f52d385408de4.....3f3ebd07c4&searchterm=S

 

 

Always return

 

{
    "Items": [],
    "TotalRecordCount"0
}
Edited by ArthurAttout
Link to comment
Share on other sites

  • Solution
PenkethBoy

add "Recursive=true" to the api call

 

so emby searches through all items - otherwise its restricted to top level items - and you will get no results as your libraries are i guess not called South park etc

 

 

TIP: to find out how the api works is to try something in the web app - then look at the logs to see the api call - and find out what emby uses as a api call - then you can try in swagger to experiment

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