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

Fixed removing recordings with Lifetime = 99

This commit is contained in:
Klaus Schmidinger 2001-06-12 15:32:47 +02:00
parent 47c5bd66a8
commit f585f21583
2 changed files with 11 additions and 11 deletions

View File

@ -500,4 +500,4 @@ Video Disk Recorder Revision History
"Green" button in the "Main" menu. The "Edit Channel" menu therefore now
has two audio PID fields (Apid1 and Apid2). By default, Apid2 is 0, which
means there is no alternate audio track.
- Fixed removing recordings with Lifetime = 99.

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.30 2001/06/02 10:07:01 kls Exp $
* $Id: recording.c 1.31 2001/06/12 15:31:32 kls Exp $
*/
#define _GNU_SOURCE
@ -94,8 +94,7 @@ void AssertFreeDiskSpace(int Priority)
cRecording *r = Recordings.First();
cRecording *r0 = NULL;
while (r) {
if (r->lifetime == MAXLIFETIME)
continue; // recordings with MAXLIFETIME live forever
if (r->lifetime < MAXLIFETIME) { // recordings with MAXLIFETIME live forever
if ((r->lifetime == 0 && Priority > r->priority) || // the recording has 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) {
@ -105,6 +104,7 @@ void AssertFreeDiskSpace(int Priority)
else
r0 = r;
}
}
r = Recordings.Next(r);
}
if (r0 && r0->Delete())