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

+

'''User Jobs''' are customized tasks which can act on MythTV recordings. A MythTV system currently supports up to four User Jobs.

+

{{Note box| Beginning with release 0.26, timestamps of recordings are stored in UTC. Applications that use xxxTIME parameters to directly index the database will need to either handle timezone conversion internally, or switch to the respective xxxTIMEUTC parameters. See [[UTC]]}}

+

<br>

+

__TOC__

== 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 to the system:

−

1) In the [[mythtv-setup]] program

+

1) In the [[mythtv-setup]] program (pages 7 & 9 of the General menu page)

−

2) By using some SQL statements to insert the job directly. For example, a hypothetical job which edits bad language:

'''Important Note:''' If you use the MythWeb method for setting up a user job, you have to restart mythbackend for the changes to take effect. (Theoretically if you are doing it via MythTV-Setup, then mythbackend isn't running anyway.)

−

UPDATE settings SET data='1' WHERE value='JobAllowUserJob1';

+

== User Job arguments ==

== User Job arguments ==

Line 16:

Line 18:

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.

| Converts an mpg recording to a format that can be played in the Nintendo DS moonshell

+

|-

+

| [[Cutting_Music_Videos]]

+

| Make multiple named cuts from a single recording (the hard way ;) ).

+

|-

+

| [[Rockbox_Export]]

+

| Export recordings to small mpegs with or without commercials, suitable for use with Rockbox[http://www.rockbox.org]. These examples are tailored for the screen and CPU capabilities of the SanDisk Sansa e200 series of media players.

+

|-

+

| [[Mythvidexport.py]]

+

| Export recordings to MythVideo

|}

|}

[[Category:HOWTO]]

[[Category:HOWTO]]

Revision as of 01:58, 17 September 2012

User Jobs are customized tasks which can act on MythTV recordings. A MythTV system currently supports up to four User Jobs.

Note: Beginning with release 0.26, timestamps of recordings are stored in UTC. Applications that use xxxTIME parameters to directly index the database will need to either handle timezone conversion internally, or switch to the respective xxxTIMEUTC parameters. See UTC

Important Note: If you use the MythWeb method for setting up a user job, you have to restart mythbackend for the changes to take effect. (Theoretically if you are doing it via MythTV-Setup, then mythbackend isn't running anyway.)

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.

1 if this recording was reactivated after failing to start on time, 0 otherwise.

Event

%RECGROUP%

Recording group

Both

%RECID%

Recording rule ID, for DB lookups.

Event

%RECSTATUS%

Recording status as an integer for completeness, not currently useful.

Event

%RECTYPE%

This is the recording rule type as an integer, in the priming script example this could be used to do an extensive priming prior to some recordings and not others. These integers are listed in recordingtypes.h in the RecordingType enum.

Export recordings to small mpegs with or without commercials, suitable for use with Rockbox[1]. These examples are tailored for the screen and CPU capabilities of the SanDisk Sansa e200 series of media players.