[mythtv] Multiple tuner conflict resolution bug or feature?

Bruce Markey bjm at lvcm.com
Fri Jan 16 19:52:53 EST 2004

First, I do want to point out that David's overrides allows
you to simply hit Enter on an "O" item and "Record it anyway"
if that's what best suits your needs. I know that the discussion
is about the default behavior but this and some other factors
haven't come up so I wanted to get this out there right away ;-).

Derek Atkins wrote:
> Isaac Richards <ijr at po.cwru.edu> writes:
>>On Friday 16 January 2004 03:22 pm, Derek Atkins wrote:
>>>"Geoffrey Hausheer" <ou401cru02 at sneakemail.com> writes:
>>>>This is by design.  the current idea is to avoid using the
>>>>conflict-resolution code whenever possible.  This means that if a
>>>>conflict can be avoided by recording a show at a later time, this is the
>>>>choice taken.
>>>Except I think it takes this choice too frequently..  Many times I have
>>>an open encoder but it still chooses to record a later time.
>>That's because it looks for future showings to resolve conflicts before it 
>>does any of the multi-card resolution.
> Which seems a bit counter-intuitive..

I can understand you're thinking that if the premise is
mis-understood. This is not a result of a concise decision
for how to handle this specific case. Rather, it is necessary
to mark showings that don't need to be recorded once one showing
of an episode has been marked to record. This must happen
somewhere, sometime before it can figure out which things still

>  I've got 4 PVR cards, why not
> use them when they are available?  I'm sure there is some logic to
> this, but I just don't see it yet.

There is some logic and I think there are some benefits that
you may not have considered so let me take a stab at it =).

The scheduler finds all the showings that might need to be
recorded, initially sets the input for the first card and
input for the sourceid, and sorts then by time. It then goes
through the list, moving forward in time, checking to see
if things overlap on the same card. If so, they are marked
as conflicts for now. If there are no conflicts, it's done
but it still needs to remove all but one of multiple showings
of matching episodes and such. If there are conflicts it can
focus on those pockets of time where things overlap and
consider shows that don't overlap as being done. Here is
where a showing with no conflicts is chosen with no malicious
intent to piss off anyone that it could have recorded on another
card in an earlier timeslot. It also has no intent of pissing
me off by recording an earlier showing on an inferior card when
it could recorded on the best card in a later timeslot but I'm
getting ahead of myself ;-).

For one card, it needs to pick which show is best and not
record lower ranked shows. However, if there are more then
one card, it checks to see if either or both shows could
be moved to another card and input for their sourceid's. If
one can move it tries to move it, if both could move it tries
to move the lower. A couple things can go slightly amiss here.
When a showing is moved, it only finds to next unoccupied
input so there is no preference sorting on cards 2 and up
for three or more cards. The "best" show gets card 1 but
2 thru N are random preference. Also, If a short show loses
to a longer show that in turn loses to a later show, the
short show could have fit on card 1 but was moved 2 and
the longer show gets moved to 3 (or if only two cards, the
long show is marked to not record even though it could have

But back to the situation being discussed. Let's say the
user has card 1 on a spiffy master that she loves and card
2 on a piece of it slave that she despises. On Tue Jan. 19
she has Nova "Secrets of the Crocodile Caves" ranked +3
showing at 8:00pm and repeated at 3:00am. American I-dull
ranked +5 at 8pm on Fox and The Tracy Morgan Show +1 at 8pm
on NBC. With the current logic she would get:

card1: Idol
card2: Morgan
card1: Nova

Perfect 8-).

If it tried to always choose the earliest showing:

card1: Idol
card2: Nova
noRecord: Morgan

Not so good. Even though Nova could record at a later time,
it out ranks Tracy Morgan which is only shown once. Also,
Nova was recorded on the crappy card rather than the good one.

So, I like the current behavior because 1) It strives to
record the earliest showing on my best card 2) it alleviates
the crunch at crunch time (I have 5 cards and much more complex
situations than this but anything that can be moved out of
crunch time is a blessing) and 3) the conflicts page shows
the (O)therShowing status and I have the choice to take the
showing at crunch time if that is best for me.

One thing I've considered hacking up and running by dlengel
is splitting up (O)therShowing into (L)aterShowing and
(E)arlierShowing. When there is an O it isn't always obvious
where to find the showing that will be recorded. A LaterShowing
would be a candidate to override in order to get it recorded
as soon as possible.

--  bjm

More information about the mythtv-dev mailing list