1
0
mirror of https://github.com/VDR4Arch/vdr.git synced 2023-10-10 13:36:52 +02:00

The SVDRP command DELR now won't delete a recording that is currently being edited

This commit is contained in:
Klaus Schmidinger 2012-02-16 12:29:27 +01:00
parent 26d2fe51d1
commit 6c7b28705e
2 changed files with 10 additions and 5 deletions

View File

@ -6879,3 +6879,4 @@ Video Disk Recorder Revision History
function is called in cDevice::SetPrimaryDevice(), anyway. function is called in cDevice::SetPrimaryDevice(), anyway.
- An ongoing editing process is now canceled if either the original or the edited - An ongoing editing process is now canceled if either the original or the edited
version of the recording is deleted from the Recordings menu. version of the recording is deleted from the Recordings menu.
- The SVDRP command DELR now won't delete a recording that is currently being edited.

14
svdrp.c
View File

@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured * and interact with the Video Disk Recorder - or write a full featured
* graphical interface that sits on top of an SVDRP connection. * graphical interface that sits on top of an SVDRP connection.
* *
* $Id: svdrp.c 2.13 2012/01/12 15:02:46 kls Exp $ * $Id: svdrp.c 2.14 2012/02/16 12:25:05 kls Exp $
*/ */
#include "svdrp.h" #include "svdrp.h"
@ -664,12 +664,16 @@ void cSVDRP::CmdDELR(const char *Option)
if (recording) { if (recording) {
cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName()); cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName());
if (!rc) { if (!rc) {
if (recording->Delete()) { if (!cCutter::Active(recording->FileName())) {
Reply(250, "Recording \"%s\" deleted", Option); if (recording->Delete()) {
::Recordings.DelByName(recording->FileName()); Reply(250, "Recording \"%s\" deleted", Option);
::Recordings.DelByName(recording->FileName());
}
else
Reply(554, "Error while deleting recording!");
} }
else else
Reply(554, "Error while deleting recording!"); Reply(550, "Recording \"%s\" is being edited", Option);
} }
else else
Reply(550, "Recording \"%s\" is in use by timer %d", Option, rc->Timer()->Index() + 1); Reply(550, "Recording \"%s\" is in use by timer %d", Option, rc->Timer()->Index() + 1);