[mythtv] Patch to DO deletion when file doesn't exit
Chris Pinkham
cpinkham at bc2va.org
Thu Feb 17 05:22:06 UTC 2005
> Isaac Richards <ijr at case.edu> writes:
>
> > Or, just use the filesize field in recorded. Mark those recordings that are 0
> > size somehow on screen. Allow removal of metadata with 0 in the filesize
> > field.
>
> Any chance you could differentiate between "file does not exist" and
> "file is zero size" and allow deletions of the latter but not the
> former?
>
> > Isaac
>
> -derek
I think that's what he said. :) The filesize in the DB is incremented
during recordings so anything with a 0 could safely be deleted.
This actually would be a very easy fix since MainServer::doDeleteThread
and MainServer::DoHandleDeleteRecording() have access to the ProgramInfo
info for the recording and could easily check it and allow deletes
if the ProgramInfo->filesize was 0. Mainly just changing things like
"if (fileExists)" to "if (fileExists || pginfo->filesize == 0)".
Patches anyone? :)
[goes away for a few minutes]
OK, will be in CVS in a few minutes, just testing the various cases
right now.
--
Chris
More information about the mythtv-dev
mailing list