Project

General

Profile

Detect if TVheadend is currently recording

Added by Gabor Kovacs about 7 years ago

Is there a command line query to tell if TVheadend is currently recording something?

I would like to delay a comskip process triggered by the post-recording event if there is another recording already going on.


Replies (2)

RE: Detect if TVheadend is currently recording - Added by Mr Rooster about 7 years ago

If you're using 4.2, the following works:

curl -s http://<user>:<pass>@localhost:9981/api/dvr/entry/grid_upcoming | grep -q '"sched_status":"recording",'
if [ "$?" == "0" ]; then 
  echo Recording...
else 
  echo Not recording...
fi

You'll need to replace <user> and <pass> with the correct credentials, the user needs some privilege or other (I run with the --no-acl option so I can't remember the exact setting).

HTH

RE: Detect if TVheadend is currently recording - Added by stepher ru about 7 years ago

Using a RPI 3/OSMC/TVHeadEnd/HDHomeRun dual tuner. Interested in acquiring the same info but would like to identify which channel(s) are in active recording mode (to turn on/off respective LEDs). Does this command provide that kind of info? If not, any way to get it?

Thanks and cheers....

Gabor Kovacs wrote:

Is there a command line query to tell if TVheadend is currently recording something?

I would like to delay a comskip process triggered by the post-recording event if there is another recording already going on.

curl -s http://&lt;user&gt;:&lt;pass&gt;@localhost:9981/api/dvr/entry/grid_upcoming | grep -q '"sched_status":"recording",'
if [ "$?" == "0" ]; then
echo Recording...
else
echo Not recording...
fi

    (1-2/2)