Recordfilter table

From MythTV Official Wiki
Jump to: navigation, search

Important.png Note: The correct title of this article is recordfilter table. It appears incorrectly here due to technical restrictions.

The recordfilter table contains the Advanced Recording Options or Custom Recording rules.

Since DB-Schema 1277.

Table Description

Field name Type Null Key Default Extras Description
filterid int(10) unsigned PRI unique ID, not auto-generated, referenced by filter in the recorded table.
description varchar(64) NULL NULL A human readable description for the rule
clause varchar(256) NULL NULL the WHERE-clause of the SQL query to run
newruledefault tinyint(1) NULL 0 if not zero, the rule is automatically added to each new recording rule

Fields

filterid
the numerical value is used to build a bit-fields, so small values should be used probably.

Default examples

mysql> SELECT description, clause FROM recordfilter;
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| description          | clause                                                                                                                                                                                     |
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| New episode          | program.previouslyshown = 0                                                                                                                                                                |
| Identifiable episode | program.generic = 0                                                                                                                                                                        |
| First showing        | program.first > 0                                                                                                                                                                          |
| Prime time           | HOUR(CONVERT_TZ(program.starttime, 'UTC', 'SYSTEM')) >= 19 AND HOUR(CONVERT_TZ(program.starttime, 'UTC', 'SYSTEM')) < 22                                                                   |
| Commercial free      | channel.commmethod = -2                                                                                                                                                                    |
| High definition      | program.hdtv > 0                                                                                                                                                                           |
| This episode         | (RECTABLE.programid <> '' AND program.programid = RECTABLE.programid) OR (RECTABLE.programid = '' AND program.subtitle = RECTABLE.subtitle AND program.description = RECTABLE.description) |
| This series          | (RECTABLE.seriesid <> '' AND program.seriesid = RECTABLE.seriesid)                                                                                                                         |
| This time            | ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ(  ADDTIME(RECTABLE.startdate, RECTABLE.starttime), 'Etc/UTC', 'SYSTEM'),   CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))) MOD 1440 <= 10        |
| This day and time    | ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ(  ADDTIME(RECTABLE.startdate, RECTABLE.starttime), 'Etc/UTC', 'SYSTEM'),   CONVERT_TZ(program.starttime, 'Etc/UTC', 'SYSTEM'))) MOD 10080 <= 10       |
| This channel         | channel.callsign = RECTABLE.station                                                                                                                                                        |
+----------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+