[mythtv] undelete

andrew burke aburke at bitflood.org
Thu Mar 10 00:52:33 UTC 2005

>>In general, I don't see any reason why you don't want undo anywhere
>>you can get it easily.
> And therein lies the rub.  If the user's hard drive is only used for
> recordings then such a system is easy.  It it's not then either you eat
> up space that might be used for other media,  you limit the amount of
> space the user is allowed to use for recordings or you force the user to
> take an extra action to really get rid of a recording (ala the windows
> recycle bin) none of those is a really acceptable option IMO.

It seems that this could still work within the bounds of reason:

When you delete a show, it's marked for deletion, but is not actually
removed.  It's not shown on the list of shows that you're able to watch. 
To reclaim it, one would have to go to a UI screen for undeleting shows.

Shows marked for deletion are actually deleted when more space is needed,
and/or to stay under whatever limit mythtv has been given in terms of hard
disk usage.  They are ordered for deltion based on some metric, the
simplest being time since being marked for deletion.

Yes, if you use your machine for more than mythtv and you absolutely want
to have more drive space, you will have to manually purge the shows marked
for deletion.

However, I would argue that that is in some ways user error, since one
would hope that if you have told mythtv it should use 50gb that you're
keeping that much space available for it to use.

There are also other things you could use to calculate when to actually
delete a show, such as overall disk usage... for example:

100gb disk
mythtv has been alotted 50gb
20gb are being used by other stuff

total usage: 70%

myth might feel totally free to keep shows that have been marked for
deletion around (still staying under 50gb usage) in this case, however:

100gb disk
mythtv has been alotted 50gb
49gb are being used by other stuff

total usage: 99%

mythtv might be agressive about actually deleting shows and keeping its
disk usage to a minimum in this case, because it realizes the user is
riding the edge.

Finally, a third case:

100gb disk
mythtv has been alotted 50gb
55gb are being used by other stuff

total usage: "105%"

in this case, mythtv might really delete shows when you tell it to delete
something, so you'd have no chance to reclaim an accidentally deleted

If you use the above cases, I think you could make a system that would do
what almost every user wants.


More information about the mythtv-dev mailing list