[mythtv-users] Power recording rule to choose between dual feeds

David Engel david at istwok.net
Thu Jan 21 00:06:58 UTC 2010


On Wed, Jan 20, 2010 at 01:44:46PM -0800, Michael Rice wrote:
> On Wed, Jan 20, 2010 at 8:21 AM, David Engel <david at istwok.net> wrote:
> > If you go this route, I suggest you manually rename the "GAME?"
> > callsigns to "GAME0?". ?That would make parsing out the number much
> > easier. ?In the example I gave earlier, I initially tried to use the
> > callsigns as is, but MySQL's lack of a regexp-based replace made it
> > look to be fairly tedious. ?I then switched to using channum to
> > illustrate the point.
> 
> Here's what I have which seems to be working:
> 
> priorityname: Leafs Home
> recpriority: 1
> selectclause: ((program.title = 'NHL Hockey') * (program.subtitle LIKE
> '% at Toronto Maple Leafs%') * (channel.channum >= 457 AND
> channel.channum <= 470) * (14 - substring(channel.callsign,5)))
> 
> priorityname: Leafs Away
> recpriority: 1
> selectclause: ((program.title = 'NHL Hockey') * (program.subtitle LIKE
> '%Toronto Maple Leafs at %') * (channel.channum >= 457 AND
> channel.channum <= 470) * (substring(channel.callsign,5) - 1))
> 
> priorityname: Leafs HighDef
> recpriority: 14
> selectclause: program.title = 'NHL Hockey' AND program.subtitle LIKE
> '%Toronto%' AND (channel.channum < 457 OR channel.channum > 470)
> 
> Look ok?

I think that should work.  I like your use of substring.  I got so
fixated on trying to extract the one or two digits from the end of the
callsign that I didn't even think of the simple solution of just
chopping the constant part from the front.

David
-- 
David Engel
david at istwok.net


More information about the mythtv-users mailing list