On Sat, Jun 18, 2005 at 11:02:01AM -0400, Robert Tsai wrote: > At the bottom of the recorded_programs.php page, total disk usage is > reported, but there is an implication that all of it is used by > recorded programs (which it isn't, at least not in my case, since I > have a single partition holding videos, livetv, photos, music, and > recordedtv). > > The current last line of the recorded_programs.php page reads: > > 19 programs, using 150 GB (16 hrs 11 mins) out of 284 GB. > > This patch changes the text to read: > > 19 programs, using 33 GB (16 hrs 11 mins) out of 284 GB (134 GB free).
Oops. *Sigh*. Patch attached this time. --Rob
Index: recorded_programs.php
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/recorded_programs.php,v
retrieving revision 1.34
diff -u -r1.34 recorded_programs.php
--- recorded_programs.php 8 Jun 2005 01:28:30 -0000 1.34
+++ recorded_programs.php 18 Jun 2005 14:55:52 -0000
@@ -65,6 +65,7 @@
// Parse the program list
$recordings = get_backend_rows('QUERY_RECORDINGS Delete');
+ $Total_Used = 0;
$Total_Time = 0;
$Total_Programs = 0;
$All_Shows = array();
@@ -81,8 +82,9 @@
// Make sure this is a valid show
if (!$show->chanid || $show->length < 1)
continue;
- // Keep track of the total time
+ // Keep track of the total time and disk space used
$Total_Time += $show->length;
+ $Total_Used += $show->filesize;
// Skip programs the user doesn't want to look at, but keep track of
their names and how many episodes we have recorded
$Total_Programs++;
$Program_Titles[$record[0]]++;
Index: languages/English.php
===================================================================
RCS file: /var/lib/mythcvs/mythplugins/mythweb/languages/English.php,v
retrieving revision 1.53
diff -u -r1.53 English.php
--- languages/English.php 7 Jun 2005 15:45:55 -0000 1.53
+++ languages/English.php 18 Jun 2005 14:55:52 -0000
@@ -17,13 +17,14 @@
// Shared Terms
'$1 min' => '',
'$1 mins' => '',
- '$1 programs, using $2 ($3) out of $4.' => '',
+ '$1 programs, using $2 ($3) out of $4 ($5 free).' => '',
'$1 to $2' => '',
'Advanced Options' => '',
'Airtime' => '',
Index: themes/Default/recorded_programs.php
===================================================================
RCS file:
/var/lib/mythcvs/mythplugins/mythweb/themes/Default/recorded_programs.php,v
retrieving revision 1.49
diff -u -r1.49 recorded_programs.php
--- themes/Default/recorded_programs.php 7 Jun 2005 15:45:55 -0000
1.49
+++ themes/Default/recorded_programs.php 18 Jun 2005 14:55:52 -0000
@@ -14,7 +14,7 @@
// Print the main page header
parent::print_header("MythWeb - Recorded Programs");
// Print the page contents
- global $All_Shows, $Total_Time;
+ global $All_Shows, $Total_Time, $Total_Used;
?>
<script language="JavaScript" type="text/javascript">
@@ -204,10 +204,11 @@
</table>
<?php
echo '<p align="right" style="padding-right: 75px">'
- .t('$1 programs, using $2 ($3) out of $4.',
t($GLOBALS['Total_Programs']),
- nice_filesize(disk_used),
+ .t('$1 programs, using $2 ($3) out of $4 ($5 free).',
t($GLOBALS['Total_Programs']),
+ nice_filesize($Total_Used),
nice_length($Total_Time),
- nice_filesize(disk_size))
+ nice_filesize(disk_size),
+ nice_filesize(disk_size -
disk_used))
.'</p>';
// Print the main page footer
signature.asc
Description: Digital signature
_______________________________________________ mythtv-dev mailing list [email protected] http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-dev
