Ticket #6438 (closed defect: fixed)
Opened 3 years ago
Last modified 3 years ago
maxEpisodes is not respected with back-to-back recordings
| Reported by: | gnome42 | Owned by: | gnome42 |
|---|---|---|---|
| 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
Change History
comment:1 Changed 3 years ago by gnome42
- Owner changed from bjm to gnome42
- Status changed from new to assigned
comment:2 in reply to: ↑ description Changed 3 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 3 years ago by gnome42
- Attachment 6438_maxepisodes_fix_v3.diff added
Version 3. Clear duplicate and set preserve
comment:3 Changed 3 years ago by shane
- Status changed from assigned to closed
- Resolution set to fixed
(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.
