[mythtv] Proposed workaround for scheduling problem with overlapped recording rules (bug #3242)

Bruce Markey bjm at lvcm.com
Thu Mar 29 22:42:56 UTC 2007


David Engel wrote:
...
> This is already being looked at.  The most likely change is going to
> be to prefer rules that want to record over ones that don't except for
> kDontRecord.  It just hasn't been tested enough.

s/enough/at all/ unless you took a stab at it. My first
suggestion was invalid because I hadn't considered an
explicit don't record override where this state is set in
AddNewRecords(). A tweak to the vague description of the
objective is; to prefer rules that are eligible to record
over those that are known to be ineligible. We do this with
Inactive and Repeat which Hal singled out earlier. This just
needs to be generalized for other states.

AFAICT, the possible states for PruneOverlaps are rsUnkown
which are still eligible, rsDontRecord which must win. rsAborted
rsOffLine, rsTooManyRecordings, rsRepeat, rsPreviousRecording,
rsCurrentRecording, rsInactive, rsMissed and rsNotListed each are
known to be ineligible. Not all of these states could be different
between two rules for the same showing but if one is one of these
states and the other is rsUnknown (eligible) the rsUnknown should
win control. This should be reasonable for future showings but
I wonder if there could be confusion for changing states of
things in the current timeslot that might flip-flop which rule
is in control.

So Cops is on two channels. I set a kChannelRecord for 5 KVVU
(episode 17 at 13:30 and 4:30 gets Latered, not what I was looking
for but I'll go with it =) then an All with Don't match duplicates
from a showing on 54 COURT.

--- print list start ---
Title - Subtitle                Chan ChID Day Start  End   C I  T N   Pri
Cops                               5 1005  29 13:30-14:00  0 0  C L  -1/0
Cops - "Drug Busts 1: Special Ed  54 1054  29 19:00-19:30  1 1  A 1  -1/0
Cops - "Tazed & Confused Special  54 1054  29 19:30-20:00  1 1  A 1  -1/0
Cops - "Las Vegas"                 5 1005  30 00:00-00:30  1 1  C 1  -1/0
Cops                               5 1005  30 04:30-05:00  1 1  C 1  -1/0
Cops - "Fresno"                    5 1005  30 13:00-13:30  1 1  C 1  -1/0

The C rule was L before the A rule was applied but All could
have recorded this. Reactivate:

Cops                               5 1005  29 13:30-14:00  1 1  C 1  -1/0
Cops - "Drug Busts 1: Special Ed  54 1054  29 19:00-19:30  1 1  A 1  -1/0
Cops - "Tazed & Confused Special  54 1054  29 19:30-20:00  1 1  A 1  -1/0
Cops - "Las Vegas"                 5 1005  30 00:00-00:30  1 1  C 1  -1/0
Cops                               5 1005  30 04:30-05:00  0 0  C E  -1/0
Cops - "Fresno"                    5 1005  30 13:00-13:30  1 1  C 1  -1/0

I thought the All may take precedence but the Channel rule state
is kept in oldrecording and is the controlling rule when reactivated.
Either way, the 4:30 showing is now E. Stop Recording:

Cops                               5 1005  29 13:30-14:00  0 0  C R  -1/0
Cops - "Drug Busts 1: Special Edi 54 1054  29 19:00-19:30  1 1  A 1  -1/0
Cops - "Tazed & Confused Special  54 1054  29 19:30-20:00  1 1  A 1  -1/0
Cops - "Las Vegas"                 5 1005  30 00:00-00:30  1 1  C 1  -1/0
Cops                               5 1005  30 04:30-05:00  1 1  A 1  -1/0
Cops - "Fresno"                    5 1005  30 13:00-13:30  1 1  C 1  -1/0

The C rule is stopped and Recorded. This is eligible for All
and therefore might have restarted which would cause confusion.
However, the C rule maintains control in oldrecorded and it is
stopped. Now the 4:30 showing is controlled by All and will
record. In the previous run, this was "C E".

This is another grey area. For episode 17 on ch 5, both showings
should belong to the channel rule. Further along in placement, the
4:30 gets marked as Earlier. When I stop the recording, they are
both marked as currently recorded and therefore the All rule with
no dup matching wins control of the 4:30 showing.

In the real world, If the 13:30 showing recorded to completion,
I don't think it needs to be recorded by another rule. This is
a contrived test case and this scenerio shouldn't matter in any
real situations (I don't think). A possible solution would be to
reconsider which rule after MarkOtherShowings but that would be
messy and probably unnecessary.

Even though there may be odd results when doing stupid things,
this should cover the more general cases where a rule that is
ineligible to record will lose to one that is still eligible.

--  bjm





-------------- next part --------------
A non-text attachment was scrubbed...
Name: ruleprecedence.diff
Type: text/x-diff
Size: 1257 bytes
Desc: not available
Url : http://mythtv.org/pipermail/mythtv-dev/attachments/20070329/149f896f/attachment.bin 


More information about the mythtv-dev mailing list