[mythtv] auto expire problem with "max episodes" option
gnassas at mac.com
Tue Oct 7 18:04:48 UTC 2014
I'm running current master and have been seeing some odd behaviour with recording rules which have a maximum number of episodes to keep and are set to delete old episodes when the limit is reached.
The problem is myth fails to do deletes when it seems generic unidentified episodes, they just pile up until N number of identified episodes are recorded and then myth deletes everything down to the limit.
This problem seems to have started some time late last spring, maybe May or June, because one show I record hasn't expired anything since last June even though it's way past its limit. The rule limit for that program is 26 and myth is now sitting on 117 episodes.
Reviewing AutoExpire::ExpireEpisodesOverMax I see some good logic to iterate through each recording rule with a limit and to count up non-preserved recordings associated with each rule until I get to this line near the bottom of the method:
episodeParts[episodeKey] = 1;
if( duplicate )
"found" is the count of recordings potentially over the max when "duplicate" is the column from the recorded table. It seems wrong to only count duplicates when counting episodes, the opposite is what ought to be happening unless I'm missing some subtle angle. I'm happy to send in a one-character patch if somebody can confirm a bug.
Despite the funkiness above episode limits do seem to work for my rules that have identified episodes which makes me think there is some other place where tests and deletions are done. Probably as part of the start of recording but I haven't been able to find where. Could someone point me in the right direction and I'll investigate and work up a patch.
More information about the mythtv-dev