diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-12 13:48:32 +0200 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2013-10-12 13:48:32 +0200 |
commit | 8bc6bcf86e8c526bddd1a5d870c879c552fa82f6 (patch) | |
tree | ff32d81313bf7b761245b0833a06e0cf2d66bf3f /recording.c | |
parent | 54b3135d59656485b9eda9443fb06bb635a73a9a (diff) | |
download | vdr-8bc6bcf86e8c526bddd1a5d870c879c552fa82f6.tar.gz vdr-8bc6bcf86e8c526bddd1a5d870c879c552fa82f6.tar.bz2 |
The function cRecordings::MBperMinute() now only takes into account recordings with less than 5 seconds per megabyte
Diffstat (limited to 'recording.c')
-rw-r--r-- | recording.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/recording.c b/recording.c index 31eb25b5..90910108 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 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; + } } } } |