Jump to content


Photo

Get TV show ID by name

api subtitles ID

Best Answer PenkethBoy , 28 December 2019 - 08:29 AM

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

Go to the full post


  • Please log in to reply
6 replies to this topic

#1 ArthurAttout OFFLINE  

ArthurAttout

    Newbie

  • Members
  • 7 posts
  • Local time: 12:29 AM

Posted 27 December 2019 - 03:33 PM

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 !



#2 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156973 posts
  • Local time: 07:29 PM

Posted 27 December 2019 - 04:24 PM

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

#3 ArthurAttout OFFLINE  

ArthurAttout

    Newbie

  • Members
  • 7 posts
  • Local time: 12:29 AM

Posted 27 December 2019 - 05:00 PM

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:809...term=South Park

 

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


Edited by ArthurAttout, 27 December 2019 - 05:01 PM.


#4 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 4299 posts
  • Local time: 12:29 AM
  • LocationWarrington,UK

Posted 27 December 2019 - 05:36 PM

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



#5 Luke OFFLINE  

Luke

    System Architect

  • Administrators
  • 156973 posts
  • Local time: 07:29 PM

Posted 27 December 2019 - 08:24 PM

Our api wiki can also be found here:
https://github.com/M...owser/Emby/wiki
Thanks.

#6 ArthurAttout OFFLINE  

ArthurAttout

    Newbie

  • Members
  • 7 posts
  • Local time: 12:29 AM

Posted 28 December 2019 - 06:15 AM

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/M...owser/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, 28 December 2019 - 06:17 AM.


#7 PenkethBoy OFFLINE  

PenkethBoy

    Advanced Member

  • Members
  • 4299 posts
  • Local time: 12:29 AM
  • LocationWarrington,UK

Posted 28 December 2019 - 08:29 AM   Best Answer

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


  • Spaceboy and ArthurAttout like this





Also tagged with one or more of these keywords: api, subtitles, ID

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users