ArthurAttout 1 Posted December 27, 2019 Posted December 27, 2019 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 !
Luke 39335 Posted December 27, 2019 Posted December 27, 2019 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
ArthurAttout 1 Posted December 27, 2019 Author Posted December 27, 2019 (edited) 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 December 27, 2019 by ArthurAttout
PenkethBoy 2066 Posted December 27, 2019 Posted December 27, 2019 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
Luke 39335 Posted December 28, 2019 Posted December 28, 2019 Our api wiki can also be found here: https://github.com/MediaBrowser/Emby/wiki Thanks.
ArthurAttout 1 Posted December 28, 2019 Author Posted December 28, 2019 (edited) 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 December 28, 2019 by ArthurAttout
Solution PenkethBoy 2066 Posted December 28, 2019 Solution Posted December 28, 2019 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 2
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now