[mythtv-users] Set up a Holiday Special Recording Schedule??

Michael T. Dean mtdean at thirdcontact.com
Wed Dec 3 20:06:40 UTC 2008

On 12/03/2008 02:08 PM, boehm100 wrote:
> From: Brad DerManouelian
>> On Dec 3, 2008, at 9:49 AM, boehm100 wrote:
>>> Thanks Brad.  That worked well. Unfortunately I think "program.hdtv  
>>> = 1" is too strict. I would like to include programs like "Rudolph  
>>> the Red-Nosed Reindeer" being broadcast on KOIN-HD, but it does not  
>>> have the hdtv flag.  Is there anyway to specify the tuner instead?   
>>> I have an HDHomeRun and two PVR-150s.  Basically if its on a digital  
>>> channel and its a holiday special I would like to capture it.
>> You could do it based on chanid. For instance, all my OTA chanid's  
>> start with 1 so if I only wanted to catch the programs only when they  
>> are available OTA (all my digital channels), I would add:
>> AND chanid BETWEEN 999 AND 2000
>> I don't know enough about the scheduler to suggest a way to limit it  
>> to a single tuner.
> What about:
> AND chanid *.1

You probably mean:

AND chanid LIKE '%.1'

(which will "technically" work, though chanid is an INT(10), because of 
the implied VARCHAR conversion).  However, chanid is /not/ the same as 
channel number.  Channel number is the one that has the "subchannel" 
information encoded (i.e. my channel for FOX is chanid 1351 and channel 
number 35_1--I use underscores instead of period as my 
channel/subchannel separator).  So, really, you'd need:

AND channel.channum like '%.1'


AND channel.channum like '%_1'


AND channel.callsign like '%HD'

or whatever, depending on how your channels are defined.  And, though 
those approaches would all work, they are very inefficient because of 
the string comparisons.  So, a /much/ better approach would be to use:

AND channel.sourceid = 2


AND channel.sourceid IN (2,3)

or whatever, depending on which video sources provide your digital channels.

The approach that Brad suggested, limiting based on a range of chanid's, 
would work, too (as kind of a roundabout approach to limiting based on 
sourceid).  Unless you have /very/ high-numbered channels (i.e. > 1000 
for analog or > 99 (major channel number) for digital), the default 
algorithm used to choose chanid will ensure chanid's for a particular 
source fall into a range of 1000 values (i.e. 1000-1999), so limiting by 
a range of chanid's is equivalent to limiting by a video source, where a 
video source specifies the channels available on a particular input.  
So, you could just choose the range of chanid's that identify the input 
connected to your digital capture card (unless you have high channel 

Note, however, that the most important thing to know about creating 
custom recording rules is there's actually a built-in "help" for custom 
rule creation with all the example clauses available in mythfrontend.  
You just find one that's close to what you need, tell mythfrontend to 
add the example to your clause (repeating for all the clauses you need 
to build your query), then edit the specifics as required.

Bruce Markey and Robert Kulagowski wrote up some great documentation at 
http://mythtv.org/docs/mythtv-HOWTO-12.html#ss12.5 .  And, really, 
anyone using Myth should read all of section 12, Scheduling Recordings:  
http://mythtv.org/docs/mythtv-HOWTO-12.html .


More information about the mythtv-users mailing list