Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

file 28 lines (27 sloc) 0.855 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
Description: Shows remaining recording capacity in recordings menu.
 (Requires timer-info patch)
Author: Walter Koch <koch@u32.de>

Index: vdr-1.7.27/menu.c
===================================================================
--- vdr-1.7.27.orig/menu.c 2012-03-25 14:18:05.704975038 +0200
+++ vdr-1.7.27/menu.c 2012-03-25 14:18:05.734975038 +0200
@@ -2594,6 +2594,19 @@
          }
       }
   free(LastItemText);
+
+//kw
+ char *buffer = NULL;
+ int FreeMB;
+ int Percent = VideoDiskSpace(&FreeMB);
+ int Minutes = int(double(FreeMB) / MB_PER_MINUTE);
+ int Hours = Minutes / 60;
+ Minutes %= 60;
+ asprintf(&buffer, "%s %d%% %2d:%02d %s (%.1f GB)", tr("Disk"), Percent, Hours, Minutes, tr("free"), FreeMB / 1024.0 );
+ SetTitle(buffer);
+ free(buffer);
+//kw
+
   Refresh |= SetFreeDiskDisplay(Refresh);
   if (Refresh)
      Display();
Something went wrong with that request. Please try again.