Opened 14 years ago

Closed 14 years ago

#3242 closed defect (fixed)

Scheduler fails to record programs that match multiple recording rules, depending on which rule is matched first.

Reported by: anonymous Owned by: Isaac Richards
Priority: minor Milestone: unknown
Component: mythtv Version: 0.20
Severity: medium Keywords: schedule multiple match rules
Cc: Ticket locked: no


If a particular program would be recorded under more than one recording rule (in my case a custom rule), it appears that whichever rule is found to match first determines wether the episode will be recorded, rather than all the rules being checked to see if it can be recorded as it should.

As an example, if there is one recording rule to record any program in the "Comedy" genre with an episode limit of 5, and a second rule to record a particular show title that is also happens to be in the "Comedy" genre, if the first rule has already reached its limit of 5 episodes, the recording is marked as "T" and is not allocated to and recorded under the second rule even if that rule has not reached its episode limit or has no limit set.

Change History (2)

comment:1 Changed 14 years ago by subbyz

I have dug in and found a semi-reasonable workaround for this bug. In scheduler.cpp's comp_overlap() function, add the following two lines somewhere before the final line (I tested it immediately before the final line, but it might be better to be higher in the list, like after the title or chanid test):

if (a->recpriority != b->recpriority)

return a->recpriority > b->recpriority;

This gives a preference in the PruneOverlaps? function to allocate potential recordings to higher priority recording rules first. A better solution would be to key off of whether the rule is actually able to record programs, as this workaround still doesn't handle some possible cases very well, but the necessary info for a better fix doesn't appear to be currently available in the ProgramInfo? struct. So this seemed like the best solution without requiring fairly extensive changes.

Tested, and works ok here as long as the overlapping rules are given different priorities, and as long as it is ok that the lower priority rule will never be able to record a show that matches the higher priority rule.

comment:2 Changed 14 years ago by bjm

Resolution: fixed
Status: newclosed

(In [13167]) When two or more rules match the same showing, generalize the execptions where a rule with a record status that is know to be ineligilbe will yield to a rule that may still be elegilbe to record the showing.

Closes #3242

Note: See TracTickets for help on using tickets.