id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,mlocked 1654,Auto-expire doesn't handle max episodes when overrides are involved,derek@…,cpinkham,"I have a recording rule for Blue Jays games with a max episode limit of 1 and 'record new and expire old' set to true. Today's game recorded, but it didn't expire yesterday's game. I traced it down to the fact that yesterday's game had an override added to it so the recordid for that recording didn't match my recording rule and therefore the autoexpirer didn't count the number of episodes properly. My fix is to include a new column in recorded called parentid, which holds the recordid of the base recording rule and then this column is used by the autoexpirer to count the episodes properly. I have this working and the autoexpirer now properly counts the episodes when I manually set the parentid column for rows in recorded. What I'm not able to get working properly is automatically setting the parentid column. I'm trying to update it when changes are made to the recorded table, but I'm obviously not quite understanding how changes are made to the recorded table when an override is introduced during an active recording. I've attached my patch as it stands now, if someone can have a look at what I'm doing wrong and point me in the right direction for setting the parentid then I'd be more than willing to finish up this patch. As it stands, the parentid is always being set to 0 (which is also the column's default value).",patch,closed,minor,0.21,mythtv,head,medium,fixed,,,0