Difference between revisions of "User Jobs"
From MythTV Official Wiki
NigelPearson (talk | contribs) (Tell folks how to actually add a job, explain the options table) |
|||
Line 1: | Line 1: | ||
+ | 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/rm-swearing.sh %DIR%/%FILE%' WHERE value='UserJob1'; | ||
+ | UPDATE settings SET data='Swearing Removal' WHERE value='UserJobDesc1'; | ||
+ | UPDATE settings SET data='1' WHERE value='JobAllowUserJob1'; | ||
+ | |||
+ | == 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 can be used on the User Job: | ||
+ | |||
{|border="1" | {|border="1" | ||
|+options for User Jobs on the backend | |+options for User Jobs on the backend |
Revision as of 11:20, 28 March 2006
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/rm-swearing.sh %DIR%/%FILE%' WHERE value='UserJob1'; UPDATE settings SET data='Swearing Removal' WHERE value='UserJobDesc1'; UPDATE settings SET data='1' WHERE value='JobAllowUserJob1';
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 can be used on the User Job:
%CHANID% | Channel ID |
%STARTTIME% | Start Time of the Recording |
%DIR% | Path to the recording directory |
%FILE% | The file name |