summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2003-10-17 14:40:37 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2003-10-17 14:40:37 +0200
commit8de5fbcbe10d9afb19b4c1a122725ac3c2c43200 (patch)
tree43613bf6e91266cb0c04e8df60a57ea996095fe7
parent1a22d480a8f66282811938f05db1ec36d15d9f51 (diff)
downloadvdr-8de5fbcbe10d9afb19b4c1a122725ac3c2c43200.tar.gz
vdr-8de5fbcbe10d9afb19b4c1a122725ac3c2c43200.tar.bz2
Edited recordings will now never be deleted automatically if the disk runs full
-rw-r--r--CONTRIBUTORS1
-rw-r--r--HISTORY2
-rw-r--r--MANUAL3
-rw-r--r--recording.c11
-rw-r--r--recording.h3
5 files changed, 17 insertions, 3 deletions
diff --git a/CONTRIBUTORS b/CONTRIBUTORS
index 7b8d73e0..3c86eee6 100644
--- a/CONTRIBUTORS
+++ b/CONTRIBUTORS
@@ -594,6 +594,7 @@ Emil Naepflein <Emil.Naepflein@philosys.de>
housekeeping
for fixing selecting the device, because sometimes an FTA recording terminated a
CA recording
+ for suggesting to never delete edited recordings automatically if the disk runs full
Gerald Berwolf <genka@genka.de>
for suggesting to deactivate some templates in tools.h in case some plugin needs to
diff --git a/HISTORY b/HISTORY
index c4c5f1c3..326e63d2 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2429,3 +2429,5 @@ Video Disk Recorder Revision History
Oliver Endriss). Note that in an existing VDR installation the current
value as set in 'setup.conf' will still be used - this change only affects
new VDR installations.
+- Edited recordings will now never be deleted automatically if the disk runs
+ full (suggested by Emil Naepflein).
diff --git a/MANUAL b/MANUAL
index 1261b70f..8687e704 100644
--- a/MANUAL
+++ b/MANUAL
@@ -327,6 +327,9 @@ Version 1.2
a second. A "start" mark marks the first frame of a resulting video
sequence, and an "end" mark marks the last frame of that sequence.
+ An edited recording (indicated by the '%' character) will never be deleted
+ automatically in case the disk runs full (no matter what "lifetime" it has).
+
* Programming the Timer
Use the "Timer" menu to maintain your list of timer controlled recordings.
diff --git a/recording.c b/recording.c
index 6d01ffa4..b6e47c55 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.83 2003/09/09 16:02:55 kls Exp $
+ * $Id: recording.c 1.84 2003/10/17 14:36:58 kls Exp $
*/
#include "recording.h"
@@ -124,7 +124,7 @@ void AssertFreeDiskSpace(int Priority)
cRecording *r = Recordings.First();
cRecording *r0 = NULL;
while (r) {
- if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
+ if (!r->IsEdited() && r->lifetime < MAXLIFETIME) { // edited recordings and recordings with MAXLIFETIME live forever
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has no guaranteed lifetime and the new recording has higher priority
(time(NULL) - r->start) / SECSINDAY > r->lifetime) { // the recording's guaranteed lifetime has expired
if (r0) {
@@ -559,6 +559,13 @@ int cRecording::HierarchyLevels(void)
return level;
}
+bool cRecording::IsEdited(void)
+{
+ const char *s = strrchr(name, '~');
+ s = !s ? name : s + 1;
+ return *s == '%';
+}
+
bool cRecording::WriteSummary(void)
{
if (summary) {
diff --git a/recording.h b/recording.h
index 42fc1a20..59a9dca0 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'vdr.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 1.27 2003/09/09 16:00:56 kls Exp $
+ * $Id: recording.h 1.28 2003/10/17 14:27:36 kls Exp $
*/
#ifndef __RECORDING_H
@@ -58,6 +58,7 @@ public:
const char *PrefixFileName(char Prefix);
int HierarchyLevels(void);
bool IsNew(void) { return GetResume() <= 0; }
+ bool IsEdited(void);
bool WriteSummary(void);
bool Delete(void);
// Changes the file name so that it will no longer be visible in the "Recordings" menu