Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vdr] Re: Re-Cutting Bug
Dirk Wiebel wrote:
>
> Hello,
>
> i just observed a problem when cutting a video twice: I cutted a video
> and saw afterwards that the cutting marks were not really well set. So I
> deleted the recording with VDR and cut it once again. The problem is
> that the film is not deleted immediately, but the /video0 entry gets a
> .del suffix (DELEXT in recordings.c). But - for example - the /video1
> entry doesn't get such a suffix, so it is overwritten with the new
> video. So far, so good. Now, if VDR starts its deleting routine, it also
> deletes the new (overwritten) files in the directory. That should not
> happen, im my opinion.
>
> Anyway, I like the delayed deletion process, because it gives you the
> cance to manually save your recordings if something went wrong. So,
> would it be possible to rename the linked directory of /video1, too? I
> suppose there should be a second line like:
>
> recordings.c:563: result = RenameVideoFile(FileName(), NewName);
>
> and the RemoveVideoFile should be edited, too.
Changing the RenameVideoFile() function would probably mean quite
a lot of work, so I went for a simpler solution in which a manually
deleted, edited recording will be explicitly removed before the
new editing process.
Here's the patch, could you please test this:
--- dvbapi.c 2002/04/06 13:14:40
+++ dvbapi.c 2002/04/06 15:21:29
@@ -1613,6 +1613,18 @@
cRecording Recording(FileName);
const char *evn = Recording.PrefixFileName('%');
if (evn && RemoveVideoFile(evn) && MakeDirs(evn, true)) {
+ // XXX this can be removed once RenameVideoFile() follows symlinks (see videodir.c)
+ // remove a possible deleted recording with the same name to avoid symlink mixups:
+ char *s = strdup(evn);
+ char *e = strrchr(s, '.');
+ if (e) {
+ if (strcmp(e, ".rec") == 0) {
+ strcpy(e, ".del");
+ RemoveVideoFile(s);
+ }
+ }
+ delete s;
+ // XXX
editedVersionName = strdup(evn);
Recording.WriteSummary();
cuttingBuffer = new cCuttingBuffer(FileName, editedVersionName);
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