Difference between revisions of "User Jobs"

From MythTV Official Wiki
Jump to: navigation, search
Line 1: Line 1:
User Jobs are programs which can act on MythTV recordings. A MythTV system currently supports four User Jobs
+
'''User Jobs''' are programs which can act on MythTV recordings. A MythTV system currently supports four User Jobs
 
 
  
 
== Adding a User Job ==
 
== Adding a User Job ==
 
There are two ways to add a User Job into the system:
 
There are two ways to add a User Job into the system:
  
1) In the mythtv-setup program
+
1) In the [[mythtv-setup]] program
  
 
2) By using some SQL statements to insert the job directly. For example, a hypothetical job which edits bad language:
 
2) By using some SQL statements to insert the job directly. For example, a hypothetical job which edits bad language:
Line 17: Line 16:
 
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.
 
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.
  
{|border="1"
+
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:silver; background:whitesmoke"
|+options for User Jobs on the backend
+
|+ '''Options for User Jobs on the Backend'''
 +
|- style="background: gainsboro"
 +
!  Option !! Description
 
|-
 
|-
 
|%CHANID%
 
|%CHANID%
Line 87: Line 88:
 
== User Job Examples ==
 
== User Job Examples ==
  
{|border="1"
+
 
| Command
+
{| border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse; border-color:silver; background:whitesmoke"
| Description
+
|- style="background: gainsboro"
 +
! Command
 +
! Description
 
|-
 
|-
 
| /usr/bin/mythcommflag -s %STARTTIME% -c %CHANID% --gencutlist
 
| /usr/bin/mythcommflag -s %STARTTIME% -c %CHANID% --gencutlist
Line 97: Line 100:
 
| Imports the flagged commercials into the cutlist
 
| Imports the flagged commercials into the cutlist
 
|-
 
|-
| [http://knoppmythwiki.org/index.php?page=CopyAndTranscode Here]
+
| [http://knoppmythwiki.org/index.php?page=CopyAndTranscode CopyAndTranscode]
 
| Copies a recording before transcoding it
 
| Copies a recording before transcoding it
 
|}
 
|}
  
 
[[Category:HOWTO]]
 
[[Category:HOWTO]]

Revision as of 23:52, 29 March 2007

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. 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.

Options for User Jobs on the Backend
Option Description
%CHANID% Channel ID
%STARTTIME% Start Time of the Recording
%DIR% Path to the recording directory
%FILE% The file name
%TITLE%
%SUBTITLE%
%DESCRIPTION%
%HOSTNAME%
%CATEGORY%
%RECGROUP%
%PLAYGROUP%
%CHANID%
%STARTTIME% In the format yyyyMMddhhmmss
%ENDTIME%
%STARTTIMEISO% In the ISO date format YYYY-MM-DD hh:mm:ss
%ENDTIMEISO%
%PROGSTART%
%PROGEND%
%PROGSTARTISO%
%PROGENDISO%
%VERBOSELEVEL%

User Job Examples

Command Description
/usr/bin/mythcommflag -s %STARTTIME% -c %CHANID% --gencutlist Imports the flagged commercials into the cutlist
/usr/bin/mythcommflag --queue --gencutlist -f %FILE% Imports the flagged commercials into the cutlist
CopyAndTranscode Copies a recording before transcoding it