summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2012-02-16 12:29:27 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2012-02-16 12:29:27 +0100
commit6c7b28705ec1e69edaa6b28f2c08ad46c8afd332 (patch)
tree67336b2925c165113ad21fb074d5ad8ac9bfa47a
parent26d2fe51d139362a99d76a90de490138dea7477e (diff)
downloadvdr-6c7b28705ec1e69edaa6b28f2c08ad46c8afd332.tar.gz
vdr-6c7b28705ec1e69edaa6b28f2c08ad46c8afd332.tar.bz2
The SVDRP command DELR now won't delete a recording that is currently being edited
-rw-r--r--HISTORY1
-rw-r--r--svdrp.c14
2 files changed, 10 insertions, 5 deletions
diff --git a/HISTORY b/HISTORY
index 098f455e..edae737e 100644
--- a/HISTORY
+++ b/HISTORY
@@ -6879,3 +6879,4 @@ Video Disk Recorder Revision History
function is called in cDevice::SetPrimaryDevice(), anyway.
- An ongoing editing process is now canceled if either the original or the edited
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.
diff --git a/svdrp.c b/svdrp.c
index a659cd49..8ed5ac9d 100644
--- a/svdrp.c
+++ b/svdrp.c
@@ -10,7 +10,7 @@
* and interact with the Video Disk Recorder - or write a full featured
* 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"
@@ -664,12 +664,16 @@ void cSVDRP::CmdDELR(const char *Option)
if (recording) {
cRecordControl *rc = cRecordControls::GetRecordControl(recording->FileName());
if (!rc) {
- if (recording->Delete()) {
- Reply(250, "Recording \"%s\" deleted", Option);
- ::Recordings.DelByName(recording->FileName());
+ if (!cCutter::Active(recording->FileName())) {
+ if (recording->Delete()) {
+ Reply(250, "Recording \"%s\" deleted", Option);
+ ::Recordings.DelByName(recording->FileName());
+ }
+ else
+ Reply(554, "Error while deleting recording!");
}
else
- Reply(554, "Error while deleting recording!");
+ Reply(550, "Recording \"%s\" is being edited", Option);
}
else
Reply(550, "Recording \"%s\" is in use by timer %d", Option, rc->Timer()->Index() + 1);