Request Category of currently running Recording

Request Category of currently running Recording

Postby Chelaz » Mon Jan 09, 2017 12:24 pm

Hi all,

I want to realize something like an ambient light functionality depending on the category of the currently watched recording on mythfrontend.

What I need is a perl/python/bash script running on my raspberry pi which frequently requests the category of the running recording.

Can anyone help me to find the easiest api call to the mythfrontend (or backend)? What I tried:

Code: Select all
http://backend:6544/Status/xml


which shows me the title and the category of the LiveTV on any encoder. But if I am watching a recording (not LiveTV) then it does not appear in the status xml stream.

Can I use the Frontend API somehow?

Thanks and best regards
Michael
GermanyChelaz
Newcomer
 
Posts: 2
Joined: Mon Jan 09, 2017 12:13 pm

Re: Request Category of currently running Recording

Postby daraden » Mon Jan 09, 2017 6:08 pm

the place to start would be
Code: Select all
http://frontendip:6547/Frontend/GetStatus

you may need the security pin
Code: Select all
http://frontendip:6547/Frontend/GetStatus?pin=<yoursecuritypin>

check the state then:

for recordings:
grab the chanid and starttime
Code: Select all
]http://backendserverip:6544/drv/GetRecorded?ChanId=<chanid>&StartTime=<starttime>

grab the category and do stuff

For video:
grab the pathname and cut it down to only the filename(Strip out myth://Videos@Hostname/). spaces and special characters need to be escaped
Code: Select all
http://backendserverip:6544/Video/GetVideoByFileName?FileName=some%20Title.mkv

grab content type do suff
United States of Americadaraden
Senior
 
Posts: 140
Joined: Tue Feb 23, 2016 7:33 am

Re: Request Category of currently running Recording

Postby Chelaz » Thu Feb 16, 2017 9:00 am

Dear daraden,

thanks for your description. In the meanwhile I already could implement my ambient light python script based on your hints.

Regards
Chelaz
GermanyChelaz
Newcomer
 
Posts: 2
Joined: Mon Jan 09, 2017 12:13 pm


Return to Services API



Who is online

Users browsing this forum: No registered users and 1 guest