[mythtv-users] Record one hour of a show everyday?
Stephen Worthington
stephen_agent at jsw.gen.nz
Sun Nov 16 01:32:00 UTC 2014
On Sat, 15 Nov 2014 08:49:19 -0800, you wrote:
>I like to record the first hour of the morning news in the morning and keep
>one that is replaced each day. The problem is the programs have different
>start times and durations depending on the day of the week.
>
>M-F 6a-8a
>Sat 6a-9a
>Sun 7a-9a
>
>End an hour early works for 6 days but not Sat. Timeslot would work for 6
>days but not Sun.
>
>Any ideas how to get a single rule to record these programs?
It looks like you would need to use two power rules ("Custom record"),
one for M-F, and a different one for Sat and Sun. The first rule
would be set to end an hour early, and the second to end two hours
early. The rules would need to have a clause limiting the day of week
they apply to. So the SQL for the rules would be something like this
for the Sat/Sun rule:
program.title='<Morning News>' and
(dayofweek(date((convert_tz(program.starttime, 'Etc/<tz>'))=1 or
dayofweek(date((convert_tz(program.starttime, 'Etc/<tz>'))=7)
and this for the M-F rule:
program.title='<Morning News>' and
(dayofweek(date((convert_tz(program.starttime, 'Etc/<tz>'))!=1 and
dayofweek(date((convert_tz(program.starttime, 'Etc/<tz>'))!=7)
The <tz> bit should be replaced by your local timezone, and <Morning
News> with the name of the news program.
Note that I have not tested these rules at all, so I might have a bug
in my SQL somewhere. They are for MythTV 0.27 and above.
More information about the mythtv-users
mailing list