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

Edited recordings will now never be deleted automatically if the disk runs full

This commit is contained in:
Klaus Schmidinger 2003-10-17 14:40:37 +02:00
parent 1a22d480a8
commit 8de5fbcbe1
5 changed files with 17 additions and 3 deletions

View File

@ -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

View File

@ -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).

3
MANUAL
View File

@ -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.

View File

@ -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) {

View File

@ -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