summaryrefslogtreecommitdiff
path: root/menu.c
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2013-10-21 08:23:19 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2013-10-21 08:23:19 +0200
commit94ced5845ab19129e0dcfb0de6e44fa57f4a87b4 (patch)
tree7d1d0bcad9e1148ebf8ca3eee915071a1c345a2f /menu.c
parenta16391ecb03c8f3a3ffe1452cdf2f3002c42f0a2 (diff)
downloadvdr-94ced5845ab19129e0dcfb0de6e44fa57f4a87b4.tar.gz
vdr-94ced5845ab19129e0dcfb0de6e44fa57f4a87b4.tar.bz2
When cutting a recording it is now checked whether there is already an edited version of this recording
Diffstat (limited to 'menu.c')
-rw-r--r--menu.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/menu.c b/menu.c
index df78513c..6fb87ef4 100644
--- a/menu.c
+++ b/menu.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: menu.c 3.10 2013/10/16 09:15:36 kls Exp $
+ * $Id: menu.c 3.11 2013/10/21 08:05:59 kls Exp $
*/
#include "menu.h"
@@ -16,6 +16,7 @@
#include <string.h>
#include "channels.h"
#include "config.h"
+#include "cutter.h"
#include "eitscan.h"
#include "i18n.h"
#include "interface.h"
@@ -2330,8 +2331,10 @@ eOSState cMenuRecordingEdit::Action(void)
if (actionCancel)
RecordingsHandler.Del(recording->FileName());
else if (doCut) {
- if (!RecordingsHandler.Add(ruCut, recording->FileName()))
- Skins.Message(mtError, tr("Error while queueing recording for cutting!"));
+ if (access(cCutter::EditedFileName(recording->FileName()), F_OK) != 0 || Interface->Confirm(tr("Edited version already exists - overwrite?"))) {
+ if (!RecordingsHandler.Add(ruCut, recording->FileName()))
+ Skins.Message(mtError, tr("Error while queueing recording for cutting!"));
+ }
}
recordingIsInUse = recording->IsInUse();
RefreshRecording();
@@ -5217,6 +5220,8 @@ void cReplayControl::EditCut(void)
Skins.Message(mtError, tr("No editing marks defined!"));
else if (!marks.GetNumSequences())
Skins.Message(mtError, tr("No editing sequences defined!"));
+ else if (access(cCutter::EditedFileName(fileName), F_OK) == 0 && !Interface->Confirm(tr("Edited version already exists - overwrite?")))
+ ;
else if (!RecordingsHandler.Add(ruCut, fileName))
Skins.Message(mtError, tr("Can't start editing process!"));
else