Opened 15 years ago

Closed 15 years ago

#6438 closed defect (fixed)

maxEpisodes is not respected with back-to-back recordings

Reported by: Shane Shrybman Owned by: Shane Shrybman
Priority: minor Milestone: 0.22
Component: MythTV - Scheduling Version: head
Severity: medium Keywords:
Cc: Ticket locked: no

Description

When there are back-to-back scheduled recordings and maxEpisodes is set and maxNewest is not, maxEpisodes is not respected.

Eg.

o Record all rule for Jeopardy!

o maxEpisodes==2 maxNewest==0

o Four back-to-back episodes of Jeopardy!

In this scenario all four showings will be recorded and the autoexpirer will dutifully delete the oldest episode as each episode is recorded.

This is due to the maxEpisodes query in the scheduler not counting the in progress recording in the max epsiode count.

The attached patch corrects this by adjusting the query to count in progress recordings in the max episodes count.

It looks safe and does the job but I could be missing something so I'm posting here for further review.

Refs #3196

Thanks to Sphery for digging up the background info on this.

Attachments (2)

maxEpisodes_count_inprogress.diff (675 bytes) - added by Shane Shrybman 15 years ago.
6438_maxepisodes_fix_v3.diff (1.1 KB) - added by Shane Shrybman 15 years ago.
Version 3. Clear duplicate and set preserve

Download all attachments as: .zip

Change History (5)

Changed 15 years ago by Shane Shrybman

comment:1 Changed 15 years ago by Shane Shrybman

Owner: changed from bjm to Shane Shrybman
Status: newassigned

comment:2 in reply to:  description Changed 15 years ago by gigem

Replying to gnome42:

The attached patch corrects this by adjusting the query to count in progress recordings in the max episodes count.

It looks safe and does the job but I could be missing something so I'm posting here for further review.

I think a better fix is to simply drop the "AND duplicate <> 0" clause. That was added in [15808] and is the cause of this regression. The issue of whether or not a "forgotten" program should count towards max-episodes can be handled separately if needed. IMHO, the forgotten program shouldn't be given any special treatment.

Changed 15 years ago by Shane Shrybman

Version 3. Clear duplicate and set preserve

comment:3 Changed 15 years ago by shane

Resolution: fixed
Status: assignedclosed

(In [20387]) Closes #6438 Fixes maxepisodes regression with back-to-back recordings

When there are back-to-back scheduled recordings and maxEpisodes is set and maxNewest is not, maxEpisodes is not respected.

This change removes the duplicate check added to the maxepisodes query in [15808]. The maxexpisodes query will now count all recordings that are not preserved.

Refs #3917

Thanks to David Engel, Chris Pinkham and Sphery.

Note: See TracTickets for help on using tickets.