[mythtv-users] (Myth) Archive to hard disk

Chris Pinkham cpinkham at bc2va.org
Wed Jun 27 11:00:57 UTC 2007


* On Wed Jun 27, 2007 at 12:49:14PM +0200, Ma Begaj wrote:
> Is there a howto for making a script which can be stopped from the menu?

No.  Basically your script has to query the jobqueue table in the
database every so often and check the cmds column to see if the
value in that column is non-zero.  These values are defined in jobqueue.h:

enum JobCmds {
    JOB_RUN          = 0x0000,
    JOB_PAUSE        = 0x0001,
    JOB_RESUME       = 0x0002,
    JOB_STOP         = 0x0004
};

So if the cmds value is 4 then your script should stop itself.  If it
is 1 then it should pause and then check again every so often until it
gets a 2 telling it to resume.

--
Chris


More information about the mythtv-users mailing list