Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[vdr] Re: How to delete recordings?



Rainer Zocholl wrote:
> 
> Klaus.Schmidinger@cadsoft.de(Klaus Schmidinger)  06.04.02 14:38
> 
> Once upon a time Klaus Schmidinger shaped the electrons to say...
> 
> >Rainer Zocholl wrote:
> >>
> >>>Also, if you delete a recording by accident, you still have a chance
> >>>of getting it back by renaming the directory from *.del back to
> >>>*.rec.
> >>
> >> Ok, then it might be sufficient/possible that the
> >> "free disk display" adds this "will be freed"-space to the "free
> >> disc" display?
> >>
> >> Or do you see an unwanted sideeffect?
> 
> >If you can give me some code that determines that "will be
> >freed"-space I'll gladly include it!
> 
> Wouldn't it be possible to make a "du -s *.del" or so on the
> directories namend ".del" ?

Well, we've just gotten rid of the external 'df' call to get the total
amount of free disk space, so I wouldn't want to start with a new external
command for this. I was thinking of some "internal" program code...

> Or move all directories/files to be deleted to a "del" directory
> to avoid a lengthly "find" instead of renaming each single file?
> 
> That would allow to view trash can contents too and to implement
> -someday- an easy an fast "undelete" too.
> 
> The free disc estimate would be a single "du -s /video/del"
> to add the "real" volume.

I don't like the idea of moving around the directories, because they may
be spread over several disks.

If your main concern is that you want recordings to be physically
removed immediately when you "delete" them, you could modify the
function cRecording::Delete() in recording.c to call
  
  isyslog(LOG_INFO, "removing recording %s", FileName());
  return RemoveVideoFile(FileName());

instead of all the code that is currently in that function (these two
lines are exactly the ones that can be found in cRecording::Remove()).

However, be warned that with this modification selecting the "Delete"
button from the "Recordings" menu may not result in an immediately
visible action, because then VDR will first be a little busy removing
the files. Also, a recording that is going on at that time may be
disturbed through the heavy disk activity. This may be different with
the various file systems, so your mileage may vary.

Klaus
-- 
_______________________________________________________________

Klaus Schmidinger                       Phone: +49-8635-6989-10
CadSoft Computer GmbH                   Fax:   +49-8635-6989-40
Hofmark 2                               Email:   kls@cadsoft.de
D-84568 Pleiskirchen, Germany           URL:     www.cadsoft.de
_______________________________________________________________



Home | Main Index | Thread Index