mirror of
https://github.com/VDR4Arch/vdr.git
synced 2023-10-10 13:36:52 +02:00
The function cRecordings::MBperMinute() now only takes into account recordings with less than 5 seconds per megabyte
This commit is contained in:
parent
54b3135d59
commit
8bc6bcf86e
@ -3193,3 +3193,7 @@ Martin Prochnow <nordlicht@martins-kabuff.de>
|
||||
|
||||
Eike Edener <eike@edener.de>
|
||||
for reporting a bug in writing group separators to channels.conf that contain a comma
|
||||
|
||||
Harald Koenig <koenig@tat.physik.uni-tuebingen.de>
|
||||
for making the function cRecordings::MBperMinute() only take into account recordings
|
||||
with less than 5 seconds per megabyte, to filter out radio recordings
|
||||
|
4
HISTORY
4
HISTORY
@ -7997,3 +7997,7 @@ Video Disk Recorder Revision History
|
||||
avoid the impression that there actually is a default remote.conf file, and to
|
||||
not use any alphabetic keys for special functions, so that they remain available
|
||||
for textual input.
|
||||
- The function cRecordings::MBperMinute() now only takes into account recordings with
|
||||
less than 5 seconds per megabyte, in an attempt to filter out radio recordings
|
||||
(thanks to Harald Koenig). The result of this function was way off any realistic
|
||||
value in case there are many radio recordings in the video directory.
|
||||
|
10
recording.c
10
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 3.4 2013/10/09 11:53:37 kls Exp $
|
||||
* $Id: recording.c 3.5 2013/10/12 13:48:32 kls Exp $
|
||||
*/
|
||||
|
||||
#include "recording.h"
|
||||
@ -68,6 +68,8 @@
|
||||
|
||||
#define MAX_LINK_LEVEL 6
|
||||
|
||||
#define LIMIT_SECS_PER_MB_RADIO 5 // radio recordings typically have more than this
|
||||
|
||||
int DirectoryPathMax = PATH_MAX - 1;
|
||||
int DirectoryNameMax = NAME_MAX;
|
||||
bool DirectoryEncoding = false;
|
||||
@ -1528,8 +1530,10 @@ double cRecordings::MBperMinute(void)
|
||||
if (FileSizeMB > 0) {
|
||||
int LengthInSeconds = recording->LengthInSeconds();
|
||||
if (LengthInSeconds > 0) {
|
||||
size += FileSizeMB;
|
||||
length += LengthInSeconds;
|
||||
if (LengthInSeconds / FileSizeMB < LIMIT_SECS_PER_MB_RADIO) { // don't count radio recordings
|
||||
size += FileSizeMB;
|
||||
length += LengthInSeconds;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user