[mythtv] Automatic deletion
cpinkham at bc2va.org
Fri Jul 4 12:07:39 EDT 2003
> Just out of curiosity: why are you including the autoexpire column in
> the order by?
> Aren't you using this to determine which auto-expire plug-in to use?
> Or have you decided on another way to implement the plug-in system?
Since 0 means "don't auto-expire", then anything non-zero will enable
auto-expire. I put it in the order by in case the autoexpire column
gets used to do some sort of ordering on autoexpirirg programs.
So, a show with a 2 in autoexpire could get expired before a show with
a 1 even though the show with the 2 is newer. I haven't done any
testing on this part yet so I may have my ASC/DESC backwards on the
The plugin stuff is really just adding a function to the AutoExpire
object, adding the setup option to globalsettings.cpp, and setting
up the call to the new function in a case statement.
So I have this currently:
int expMethod = gContext->GetNumSetting("AutoExpireMethod", 0);
case 1: FillOldestFirst(); break;
// default falls through so list is empty so no AutoExpire
// meat of function is here
To add a new one, just add a AutoExpire::FillLowestRankFirst() method and
add a "case 2: FillLowestRankFirst(); break;" above and put a line in
the setup to allow chosing the new expiration method.
After the FillExpireList() method is called, then the list is used to
start expiring until enough space is free.
Code still needs refining and some additional testing, but I have the GUI stuff
working now and will get it committed to CVS by the end of the weekend. Then
people can add stuff like the FillLowestRankFirst() method, etc. if they want.
More information about the mythtv-dev