[mythtv] Bug in 0.16 scheduler?

Bruce Markey bjm at lvcm.com
Wed Oct 13 23:25:32 UTC 2004


Joseph A. Caputo wrote:
> On Wednesday 13 October 2004 16:01, Thomas Börkel wrote:
> 
>>HI!
>>
>>On the evening of friday 15th, I have the following schedule, where
>>Myth sees a conflict, but there is none:
>>
>>#1 ch  6: 07:35 - 08:20, record every day at this time, enc 1
>>#2 ch 20: 08:10 - 09:25, record all on this channel,    enc 2
>>#3 ch 20: 09:10 - 10:25, record all on this channel,    Conflict
>>#4 ch 19: 10:00 - 12:30, record only this showing,      enc 1
>>
>>Show #2 is being rerun 3 days later (this showing has an "E"), but
>>that does not help the scheduler.
>>
>>But even without rerun, it could easily record everything with my 2
>>tuner cards:
>>
>>#1 enc 1
>>#2 enc 2
>>#3 enc 1
>>#4 enc 2
>>
>>Now comes the funny thing: If I set #4 to "record all on this
>>channel" (it's a movie that is being rerun on 19th), then the
>>conclict disappears and it records everything on the same day, like
>>it should (like in my suggestion above).
>>
>>Is this a bug or am I missing something?
> 
> 
> It's not a bug, it's a feature :-)
> 
> You haven't figured in priority.  Because show #4 is a "record only this 
> showing" type of recording, it has a higher priority than show #3.  
> Since it has a higher priority, it has dibs on enc1.  When you change 
> it to a "record all on this channel" type, its priority becomes equal 
> to (or lower than) show #3, so the scheduler can choose which tuners to 
> allocate in order to best resolve things.
> 
> Whether you consider that to be a bug or not depends upon your point of 
> view... the scheduler is quite a nice piece of work & handles a lot of 
> amazing situations very well, but it's not perfect.  You might say that 
> this is a flaw -- you really should be able to have a show recorded 
> when there is a perfectly good tuner available.  However, tweaking the 
> scheduler logic in this area (tuner preference) may be no small matter;

[actually, there are a bunch of solutions already built in...]

> I don't know, since I'm not familiar with the code, just what's been 
> discussed on the list.

JAC, as usual, is spot on. Gigem did some amazing stuff with
the scheduler that isn't well understood so I'll try to point
out a few of those things here. Since you haven't mentioned any
priorities or feature check boxes, I'll assume that everything
is priority "0" and the features are all the defaults.

As Joseph said, it's done what it was told to do. #4 as a single
has first dibs and grabs card 1. #1 is a weekslot so it's next and
it also gets card 1. #2 and #3 are tied for priority, type, and
even channel. #2 wins the tie breaker by earlier starttime. These
would normally fit back to back on the same channel bu you've
apparently added startoffset and/or endoffset so they now overlap.

There are a whole bunch of solutions. Here are some in my order
of preference.

- Priorities. Set #4 to -1 so that it loses to #3 or set #3
to +1 so it wins. For this example, this is probably best
because you get everything recorded today.

- SchedMoveHigher. Go to Setup->TV Settings->Recording Priorities->
General and check "Reschedule Higher Priorities". This is exactly
for something you pointed out. By default, highest priority wins,
period. SchedMoveHigher tells the scheduler to make a second pass
to see if it can fit in a lower priority conflict if it could move
a higher priority show to another timeslot. If you turn this on
it should then be:

#1 ch  6: 07:35 - 08:20, record every day at this time, enc 1
#2 ch 20: 08:10 - 09:25, record all on this channel,    Later
#3 ch 20: 09:10 - 10:25, record all on this channel,    enc 2
#4 ch 19: 10:00 - 12:30, record only this showing,      enc 1
...
#2 ch 20: 3 days later,  record all on this channel,    enc 1

I always use this feature. It does the best job of fitting things
and if I really want to see #2 today and don't care about #4,
this list shows me the "L" so I know that I have to option of
postponing or not and make changes if I'd like. Without
SchedMoveHigher it's harder to see which shows have other
showings where you might want to postpone.

- Overrides. Press Enter on #2 and click "Don't record" It
will then be force to not record this showing but will then
choose the showing three days later. If you'd seen this episode,
you could click "Never record" and it won't record any showings.

Or, you could instead go the showing three days from now and
click "Record anyway". Because this showing is forced to record,
today's showing will be marked "L" and #3 can have card 2.

- Input preference. In the backend setup program you can
set an "Input preference" that says that you have different
cards or resources and would rather record on the good equipment
later than on the lesser card ASAP. If you set the input
on your card 1 to +1, that would tell the system that you'd
rather get the best possible recording of #2 on card 1 three
days from now rather than the limitations of card 2 now. If
there was only one showing or if there was already a higher
show in the timeslot three days from now, it will still record
on card 2 today.

- Type priority. On the same page as SchedMoveHigher, you can
give recording types an additional boost or handicap. If you
set single to a negative value, #4 would have lost to #3.
However, this probably isn't a good idea. You could lower
Single if you didn't want one time things to interfere with
recurring shows but I think it makes more sense to boost
single records. I set Single to +3 and FindOne to -3. So...

- FindOne rather than Single. ...would have worked for me as
#3 would have beaten #4. Single record will only record
that title on that channel at that time and this is often
the right thing to do. FindOne says to record the title once
on any channel at any time. If #4 had more than one showing
the scheduler would have more flexibility. This is also a
good thing if the station changes their listings. A single
would then miss it but FindOne would schedule it for the
new timeslot. I give FindOne a handicap because I want the
scheduler to try to fit movies, specials, or other one time
shows into time slots that don't interfere with my regular
recurring series'.

- Channel Priority. Also under Setup->TV Settings->Recording
Priorities you can give advantages or disadvantages to certain
channels. Maybe by default you would prefer that anything you
pick on SpikeTV has an advantage over Lifetime (or the other
way around for WAF ;-). This doesn't suggest a specific solution
for your situation but it may have worked out by coincidence =).

--  bjm



More information about the mythtv-dev mailing list