diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2003-08-17 09:18:40 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2003-08-17 09:18:40 +0200 |
commit | 12d5d01faa95d65dba09d6b6313f59d2d2433ca9 (patch) | |
tree | d6f53979df0024af2ae4f4229e02e405ddc14923 /recording.c | |
parent | b65687ebcfe79f8258bf3ca9ece057f16fae047b (diff) | |
download | vdr-12d5d01faa95d65dba09d6b6313f59d2d2433ca9.tar.gz vdr-12d5d01faa95d65dba09d6b6313f59d2d2433ca9.tar.bz2 |
Removing deleted recordings faster than normal when cutting1.2.3
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/recording.c b/recording.c index 2e3676a3..bcbfd9f6 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.81 2003/08/15 15:23:10 kls Exp $ + * $Id: recording.c 1.82 2003/08/17 09:10:46 kls Exp $ */ #include "recording.h" @@ -95,7 +95,8 @@ void AssertFreeDiskSpace(int Priority) // a file, or mark a file for removal ("delete" it), so that // it will get removed during the next call. static time_t LastFreeDiskCheck = 0; - if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA) { + int Factor = (Priority == -1) ? 10 : 1; + if (time(NULL) - LastFreeDiskCheck > DISKCHECKDELTA / Factor) { if (!VideoFileSpaceAvailable(MINDISKSPACE)) { // Make sure only one instance of VDR does this: cLockFile LockFile(VideoDirectory); @@ -113,7 +114,7 @@ void AssertFreeDiskSpace(int Priority) r = Recordings.Next(r); } if (r0 && r0->Remove()) { - LastFreeDiskCheck += REMOVELATENCY; + LastFreeDiskCheck += REMOVELATENCY / Factor; return; } } |