diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-10-17 14:40:37 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-10-17 14:40:37 +0200 |
commit | 8de5fbcbe10d9afb19b4c1a122725ac3c2c43200 (patch) | |
tree | 43613bf6e91266cb0c04e8df60a57ea996095fe7 /recording.c | |
parent | 1a22d480a8f66282811938f05db1ec36d15d9f51 (diff) | |
download | vdr-8de5fbcbe10d9afb19b4c1a122725ac3c2c43200.tar.gz vdr-8de5fbcbe10d9afb19b4c1a122725ac3c2c43200.tar.bz2 |
Edited recordings will now never be deleted automatically if the disk runs full
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 11 |
1 files changed, 9 insertions, 2 deletions
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) { |