[mythtv] keyword-based recording

Bruce Markey bjm at lvcm.com
Sat Jan 8 21:21:45 EST 2005


Chris Petersen wrote:
> Would someone like to explain to me how this works db-wise, so I can get 
> it added to mythweb?  Does it support regex, etc?

Sure, if record.search > 0 then the secheuler knows it is a search
rule. The types can be found in ./libs/libmythtv/recordingtypes.h.

0 is kNoSearch
1 is kPowerSearch
2 is kTitleSearch
3 is kKeywordSearch
4 is kPeopleSearch

For Title, Keyword and People the string for matching is
stored in the record.description field. When the scheduler
uses one of these, it surronds them with "%" so "Junkyard%Wars"
for a kTitleSearch becomes "LIKE '%Junkyard%Wars%'". PowerSearch
is a little different in that it expects the actual SQL that is
to be plugged into the WHERE clause of scheduler's SQL query.
Custom Record and Advanced Search use this type.

That's for recording. For trying out and remembering search terms
there is mythconverg.keyword :

mysql> describe keyword;
+------------+------------------+------+-----+---------+-------+
| Field      | Type             | Null | Key | Default | Extra |
+------------+------------------+------+-----+---------+-------+
| phrase     | varchar(128)     |      | PRI |         |       |
| searchtype | int(10) unsigned |      | PRI | 3       |       |
+------------+------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)

The 'searchtype' matches the record rule type numbers. Don't
know if you'd tapped into this yet but this is here so you
can search favorite terms often without having to retype them
each time. If you used this, keywords enterted from mythfrontend
Search Words pages would be available from the MythWeb and
the other way around.

> Any other new recording option type things that I've missed lately?

Record new episodes only changed a little while back and uses
different flag bits in record.dupmethod and record.dupin .

--  bjm


More information about the mythtv-dev mailing list