[mythtv-users] Wish: MythWeb: Include user-defined canned searches

Bruce Markey bjm at lvcm.com
Mon May 14 01:13:21 UTC 2007

Chris Petersen wrote:
> Jerome Yuzyk wrote:
>> I have added a few entries to my mythweb/modules/tv/canned_searches.conf.php 
>> for some canned searches I like to have available. Every time I update Myth 
>> though, I have to put them back. A handy way around this that I think other 
>> users would like would be to have an Include of a file in ~mythtv somewhere 
>> that would be used if it exists.
> The canned searches will eventually be replaced by user-configurable
> "power searches".  I haven't had much time to work on anything in
> mythweb lately, but it will eventually happen.

FYI there is already a table for this which is used by Custom
for it's stored examples:


The 'customexample' table has columns for name, a kPowerSearch
style WHERE clause and optional FROM clause:

mysql> select * from customexample where rulename='New Flix'\G
*************************** 1. row ***************************
   rulename: New Flix
whereclause: program.category_type = 'movie' AND program.airdate >= 2006
AND program.stars > 0.5

This is a 'canned search' that will show movies released 2006
or later with a minimum of 2 stars. From the Custom Record page,
the Test button will show the results on a program list page.

This one uses a FROM clause:

   rulename: Talk, Comedy
 fromclause: LEFT JOIN programgenres ON program.chanid = programgenres.chanid AND program.starttime = programgenres.starttime
whereclause: program.chanid < 1014
AND program.generic = 0
AND program.category = 'Talk'
AND programgenres.genre = 'Comedy'

This lists late night talk shows (Letterman, Leno, Kimmel, O'Brien,
Ferguson) so I can easily scan the guest lists.

The obvious advantage of reusing this table is that mythweb
canned searches could be used from Custom Record (for searches
and to be worked into rules) and stored examples from Custom
Record would be immediately available as canned searches for

--  bjm

More information about the mythtv-users mailing list