[mythtv-users] Undelete - new feature idea

Joel Anderson bitjunkie at gmail.com
Sat Feb 24 00:00:16 UTC 2007

> > > It seems like all the pieces are already in place - it should be a simple
> > > patch to get this working (says the man who has never got round to
> > > looking at the code). I think it would be a useful feature.

Hi all,

I once made an attempt at this and hacked up source from the .18-ish
(maybe older) code to do an undelete of sorts, making use of the
existing autoexpire functionality.  I made some small changes and then
a tiny shell script on a cron job to update the autoexpire field on
the recordings (due to lack of c++ coding skill/experience to do it in
the Myth code properly).

In Myth enabled autoexpire on most of my recordings, set to "oldest
first" mode (IIRC), "do not re-record autoexpired shows", and made a
recording group called "watched".  Anything that got put into that
group had it's autoexpire value bumped up to a high number based on
when it was marked as watched by the cron job.  Inverse of the
record's last modified date I think it was, to cause "oldest watched"
to have the highest number and therefore expired first.

In case the drive was still overflowing it would eventually expire the
unwatched ones that had the normal "autoexpire" enabled, to make room
for new recordings.  To "undelete" just move the recording back out of
the "watched" group to another group or "default".

Unfortunately someone later removed the option to "not re-record"
autoexpired shows, so they would always re-record which threw a small
wrench into my little hack.  I then proceeded to lose the shell script
and source code that I modified, so my changes are gone and have not
had time to revisit this with the latest code.

I may get back to it eventually, but maybe one of the devs or another
user with more time (and better coding skills) can use this idea as a
starting point, and to do it properly this time!  =)


More information about the mythtv-users mailing list