User Jobs

From MythTV Official Wiki
Revision as of 02:56, 7 October 2006 by Quadpus (talk | contribs) (User Job arguments)

Jump to: navigation, search

User Jobs are programs which can act on MythTV recordings. A MythTV system currently supports four User Jobs

Adding a User Job

There are two ways to add a User Job into the system:

1) In the mythtv-setup program

2) By using some SQL statements to insert the job directly (thanks to Jeremy Andrus for this). For example, a hypothetical job which edits bad language:

% mysql mythconverg
UPDATE settings SET data='/path/to/ %DIR%/%FILE%' WHERE value='UserJob1';
UPDATE settings SET data='Swearing Removal' WHERE value='UserJobDesc1';
UPDATE settings SET data='1' WHERE value='JobAllowUserJob1';

Here is an example job that copies a recording before transcoding it.

I have the following setup to generate cutlist|UserJobDesc1 | Generate Cutlist | |UserJob1 | /usr/bin/mythcommflag --queue --gencutlist -f %FILE% |

User Job arguments

A user job is just a program or script which is passed some arguments to tell it what recording to perform work on. Either the channel and start time, or the directory and filename, should be sufficient to uniquely identify the recording. Any of the following four arguments are useful for User Jobs:

options for User Jobs on the backend
%CHANID% Channel ID
%STARTTIME% Start Time of the Recording
%DIR% Path to the recording directory
%FILE% The file name
advanced User Job options
%STARTTIME% In the format yyyyMMddhhmmss
%STARTTIMEISO% In the ISO date format YYYY-MM-DD hh:mm:ss