PenkethBoy 2068 Posted May 3, 2018 Posted May 3, 2018 Having looked through swagger and the wiki i am coming up empty on the following things 1. How to query the server to see if it is currently playing/streaming 2. If the server is scanning 3. if its transcoding/converting media So in simple terms is it idle - before i tell it to do x,y and z - so it does not affect users/other processes etc 1
Luke 42077 Posted May 3, 2018 Posted May 3, 2018 I would look through the api wiki because those three things each have separate apis. There is no single indication of idle.
PenkethBoy 2068 Posted May 3, 2018 Author Posted May 3, 2018 as i said i have looked through the (Api) Wiki and the documentation is fine for some things but not for finding the 3 things i want if i have missed it fine - please give me things to look for
Luke 42077 Posted May 3, 2018 Posted May 3, 2018 For #1 I would look at the remote control section. #2 scheduled tasks. #3 sync but that section isn't completed yet. 1
PenkethBoy 2068 Posted May 3, 2018 Author Posted May 3, 2018 ok thanks will have another look and report back
PenkethBoy 2068 Posted May 14, 2018 Author Posted May 14, 2018 (edited) Ok for anybody who is wondering how to do this 1. To see if something is playing - check /emby/sessions and it will return info on all devices emby knows about and if a device is playing something it will have a "NowPlayingItem" array of info on the current playing item 2. To see if a scheduled tasks is running - check emby/ScheduledTasks and it will return info on each scheduled task defined in Emby (including hidden tasks) - each task has a "State" property which can be checked to see if the task is running 3. As above as the transcoding of say recordings is a scheduled task 4. To see if a LiveTV recording is in progress - check /emby/LiveTV/Recordings and it will return info with a "TotalRecordCount" of 0 if nothing is being recorded I think that covers all bases - but if i have missed something i will report back or others can chip in. The WIKI needs a lot of work as its out of date (i.e. things have changed a lot so some of the info is misleading/missing/wrong), does not provide actual examples and ONLY talks in general terms - which for people trying to get to grips with the API is far from useful. Edited May 14, 2018 by PenkethBoy 3
PenkethBoy 2068 Posted May 15, 2018 Author Posted May 15, 2018 An update for liveTv Recordings You are better off with /emby/LiveTv/Recordings?UserId=<Id>&IsInProgress=true if you leave off Inprogress=true you will get info on Inprogress plus completed recordings still in your Emby Recordings folders
AmigaZoid 2 Posted May 17, 2018 Posted May 17, 2018 (edited) @PenkethBoy, Thank you for the info. When I try the sessions command, I get "Unable to find the specified file." The other commands like authentication and searching the library are working. I'm using .. ip:port/sessions&api_key=<token> also tried /emby/sessions My last hurdle is trying to actually play some media. I wrote a home automation server in Nodejs that controls lights, TV, and with kodi json I wrote an alexa app that controlled all of these things as well as playing any media and directing it to any client. I'm trying to do the same with Emby, just need this last command to work. Thanks again for the info you provided. Edited May 17, 2018 by AmigaZoid
Luke 42077 Posted May 17, 2018 Posted May 17, 2018 Have you checked out our remote control wiki? https://github.com/MediaBrowser/Emby/wiki/Remote-control
AmigaZoid 2 Posted May 17, 2018 Posted May 17, 2018 (edited) These replies must be automated. I would bet to say that just about all of us that are posting questions have already conducted a search through these forums, checked all the wiki links and have come here as a last resort. I saw that page and tried out /emby/sessions and /sessions already, thats why I'm now on the forum. as PenkethBoy stated, the wiki is too general and is lacking is actual examples. Edited May 17, 2018 by AmigaZoid 1
PenkethBoy 2068 Posted May 17, 2018 Author Posted May 17, 2018 ip:port/sessions&api_key=<token> change the & to a ? - as we discussed in the other thread! and its ip:port/emby/sessions?api_key the unable to find the specified file - error - is telling you you are trying to use a non existent endpoint - clue for you to check your code 1
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