diff options
author | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-13 13:22:06 +0100 |
---|---|---|
committer | Klaus Schmidinger <vdr@tvdr.de> | 2012-03-13 13:22:06 +0100 |
commit | 71f02e4f80b2ad6cd265e68c4b2253ae5e1b3663 (patch) | |
tree | a27cd27a5264ee5a849607b956ad54c974e3e61c /menu.c | |
parent | 845d6f36c16f2409eff161f8005d9dd2a0a4bf50 (diff) | |
download | vdr-71f02e4f80b2ad6cd265e68c4b2253ae5e1b3663.tar.gz vdr-71f02e4f80b2ad6cd265e68c4b2253ae5e1b3663.tar.bz2 |
When estimating the remaining disk space (in hours), the average data rate of all existing recordings is now taken into account
Diffstat (limited to 'menu.c')
-rw-r--r-- | menu.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -4,7 +4,7 @@ * See the main source file 'vdr.c' for copyright information and * how to reach the author. * - * $Id: menu.c 2.44 2012/03/11 13:20:45 kls Exp $ + * $Id: menu.c 2.45 2012/03/13 13:14:38 kls Exp $ */ #include "menu.h" @@ -78,7 +78,10 @@ bool cFreeDiskSpace::HasChanged(bool ForceCheck) int Percent = VideoDiskSpace(&FreeMB); lastDiskSpaceCheck = time(NULL); if (ForceCheck || FreeMB != lastFreeMB) { - int Minutes = int(double(FreeMB) / MB_PER_MINUTE); + int MBperMinute = Recordings.MBperMinute(); + if (MBperMinute <= 0) + MBperMinute = MB_PER_MINUTE; + int Minutes = int(double(FreeMB) / MBperMinute); int Hours = Minutes / 60; Minutes %= 60; freeDiskSpaceString = cString::sprintf("%s %d%% - %2d:%02d %s", tr("Disk"), Percent, Hours, Minutes, tr("free")); |