[mythtv] SQL to determine if a specific encoder is recording

A McDermott list at mcdermotts.ca
Thu May 10 21:54:57 UTC 2012


Looking for SQL (or pointers to appropriate join/tables) which will
allow me to determine if a particular encoder is busy.  I have found a
way to get the info of the current or next recordings, but not how to
cross-link with which particular encoder is or will be used for the
recording.

The endgame here is to once a day determine if my HDPVR is in use, or
will be in use in the near future.  If the HDPVR encoder is not in
use, I will reset it to try and avoid annoying HDPVR hangs.

Here is what I use to find the current recording program and the next
scheduled recording.

Current recording (-2) or tuning (-10):

mysql> select starttime from oldrecorded where recstatus in (-2,-10);
+---------------------+
| starttime           |
+---------------------+
| 2012-05-10 15:00:00 |
| 2012-05-10 15:00:00 |
+---------------------+
2 rows in set (0.00 sec)


Next scheduled recording:

mysql> select starttime from oldrecorded where recstatus in (-1) and
starttime > NOW() order by starttime asc limit 2;
+---------------------+
| starttime           |
+---------------------+
| 2012-05-10 16:00:00 |
| 2012-05-10 17:00:00 |
+---------------------+
2 rows in set (0.00 sec)


More information about the mythtv-dev mailing list