[mythtv] [mythtv-users] odd conflict with three tuners

Bruce Markey bjm at lvcm.com
Thu Sep 28 18:49:04 UTC 2006

Daniel Walton wrote:
> Is this a bug or is this the intended behavior due to some corner case code in
> the scheduler?

It is the result of several intended behaviors and is a strange
corner case.

> Tuner
> -----
> #1     ESPN   College Football: Michigan at Minnesota  8:00pm -> 11:30pm
> #1     ESPN   College Football Final                   12:00am -> 2:00am
> Cflict FX     Thief: No Direction Home                 11:30pm -> 12:30am
> #2     ESPN2  College Football: Georgia at Mississippi 9:00pm  -> 12:00am
> #2     FX     Thief: Flight                            12:30am -> 1:30am

Understood. Bummer. This happened because of the order all
of the equal priority things were placed and the odd way they
overlap. This could normally be fixed by moving one thing but
resulted in a situation where it would have to move two.

If you haven't yet, you can resolve this by any of: set the Thief
priority to +1, "College Football Final" -1, add an override to
just the first Thief, Georgia +1, Michigan -1. Just about anything
other than the exact circumstance =).

First, good job on reordering your inputs so that digital QAM is
the first choice, right? Shows are placed by the lowest cardinputid
but for simplicity, I'll refer to card 1 and 2 rather than inputs
2 and 3.

College Football - "Michigan at 31 2031  30 20:00-23:30  1 2  S 1   0/0
College Football - "Georgia at  32 2032  30 21:00-00:00  2 3  S 2   0/0
Thief - "No Direction Home"     71 2071  30 23:30-00:30  0 0  A C   0/0
College Football Final          31 2031  01 00:00-02:00  1 2  W 1   0/0
Thief - "Flight"                71 2071  01 00:30-01:30  2 3  A 2   0/0
Thief - "In the Wind"           71 2071  01 01:30-02:30  2 3  A 2   0/0

All of these are priority 0 so the next criteria for order of
placement is the record rule type. See "Scheduling decisions":
http://www.mythtv.org/docs/mythtv-HOWTO-12.html#ss12.2 . The
Single Football games go first and Michigan has an earlier start
so it gets card 1 while Georgia gets card 2. Next the Weekly
"College Football Final" The three "Thief" are the same priority
and the same type All. The first episode doesn't fit on card 1 or
2 but this is normal and can be fixed later by trying to move
"College Football Final". If there was just one "Thief", this
would work itself out. However, the next thing to be place is
another "Thief" which fits on 2 and overlaps "College Football
Final". And now it's stuck. It can't move one thing to resolve
the conflict, it would need to move two. We don't do this because
it would be recursive, complex, slow and could result in looping.

Currently, we try to fix conflicts by trying to move one thing
(schedMoveHigher) after all showings at the same priority level
have been placed. So, fix any problems after all the +2, again
after all the +1 then after all the 0. Since these are all 0,
(and even if they weren't, all the "Thief" are 0) it's too late
to fix it.

David had considered trying to fix each conflict as soon as it
appeared but I showed a case where a -1 substitute could cause
a priority 0 to end up as a conflict. We don't want lower priority
to cause a higher priority to be a conflict. Still, I hadn't
considered this circumstances. This might be solvable but the
solution isn't obvious and this is a rare case. There used to be
a more common case where four shows in a row overlapped with the
first and fourth having the highest priority. That was solved
but your case more subtle and takes five things to be arranged
just so.

David, now that I mention it, this really is a variation of
the four overlaps problem. 1 = Michigan, 2 = Georgia, 3 = Thief,
4 = Final. 1 and 4 win card 1 so 3 can't be placed. The new twist
is that 5 = Thief - "Flight" overlaps 4 also so 4 can't be moved
and there is also 6 = Thief - "In the Wind" which also overlaps 4.

--  bjm

More information about the mythtv-dev mailing list