[mythtv-users] Understanding custom recording advanced examples, interval 2 hour?

Bruce Markey bjm at lvcm.com
Fri Jul 7 23:49:22 UTC 2006


catfish wrote:
> I'm playing with Custom Recording and using the Examples shown in the 
> wiki for Daily Show. I was able to locate an archive of the discussion 

<rant>
This is unfortunate and highlights the weakness of public writable
wiki's. The correct information about Custom Record can be found at

http://www.mythtv.org/docs/mythtv-HOWTO-12.html#ss12.5

For reasons unknown to me, someone felt compelled to copy part
of this document, cut out information to help someone get started,
include speculative, misguided terminology that doesn't clarify
anything then include an example out of context from a Canadian
user with a specific problem that is of no use to the general
public.
</rant>

> that works on (close to) this example at
> http://www.gossamer-threads.com/lists/mythtv/users/153882

Right, as I recall, this user receives multiple video sources in
Canada and the US possibly with some in Eastern and others in the
Central timezone or something like that. TDS was on several channels
at different times where some listings did have descriptions and
others didn't. This is a horrible hack to show how to do something
ugly which has nothing to do with your listings.


> "
> program.title LIKE "%Daily Show%"
> AND MINUTE(program.starttime) = 0
> AND HOUR(DATE_SUB(program.starttime, INTERVAL 2 HOUR)) > 20
> AND WEEKDAY(DATE_SUB(program.starttime, INTERVAL 2 HOUR)) < 4
> AND (WEEKDAY(DATE_SUB(program.starttime, INTERVAL 2 HOUR)) = 0
> OR program.previouslyshown = 0)
> 
> Any "Daily Show" title, on the hour, whose start time minus two is
> in the evening of Monday through Thursday with generics accepted on
> Monday but must be new episodes for the rest of the week.
> "
> 
> What I'm not sure about is why the Interval 2 Hour aka "start time minus 
> two is the evening". Why check two hours before the start time if it's 
> after 9pm?

Because 1 (1 am) is less than 23 (11pm). The idea is to take midnight
out of the equation by moving to one side or the other.

>  Why not check if the current hour is => 11pm?

Because 1am >= 11pm is FALSE.

This is a horrible example to fixate on because it was striving
to avoid many of the showing of TDS which he received and the
goal to to pluck out just the right choices.

TDS can be recorded without a kPwoerSearch (I use a time slot rule
for 11pm). However, if we receive one US Comedy Central (EDT or PDT
and wanted to match just the the 11pm or 1am showings, this could
be done by simply modifying the "Not in primetime" example.

Rule Name: TDS

program.title LIKE '%Daily Show%'
AND (HOUR(program.starttime) < 2
      OR HOUR(program.starttime) = 23)

This matches any showing starting from 11:00 thru 1:59 but you don't
have any of the reruns and generic listings in that time period that
he had.

Title - Subtitle                Chan ChID Day Start  End   C I  T N   Pri
The Daily Show With Jon Stewart   56 1056  10 23:00-23:30  1 1  A 1   0/0
The Daily Show With Jon Stewart   56 1056  11 01:00-01:30  0 0  A E   0/0
The Daily Show With Jon Stewart   56 1056  11 23:00-23:30  1 1  A 1   0/0
The Daily Show With Jon Stewart   56 1056  12 01:00-01:30  0 0  A E   0/0

You don't need to dance around plucking out certain showings
and avoiding weekends as his situation required.

--  bjm


More information about the mythtv-users mailing list