From: Andrew Ruthven Date: Thu, 16 Sep 2010 08:56:28 +0000 (+1200) Subject: be prepared to switch to TB earlier. X-Git-Tag: 0.9.5~5 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c6ede951c867cc0f9ef3d94541e2f8e2c046ebdb;p=mythtv-status.git be prepared to switch to TB earlier. --- diff --git a/ChangeLog b/ChangeLog index 91dc3be..73639db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-09-16 Andrew Ruthven + Add support for extra recording state. + + Be ready to switch to TB's earlier. + 2010-06-13 Andrew Ruthven Allow skipping idle encoders when showing the encoder status and make that the default. Thanks to Ron Kellam for the suggestion. diff --git a/bin/mythtv-status b/bin/mythtv-status index 7e7b7ea..ba686b3 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -50,10 +50,11 @@ $c->{'auto_expire_count'} ||= 10; # How many auto expire shows to display. $c->{'recording_in_warn'} ||= 60 * 60; # When is the next recording considered critical? (seconds) # What units we have available for converting diskspaces. +# The threshold is at what level we switch to using that unit. my @size_thresholds = ( { 'unit' => 'TB', - 'threshold' => 50 * 1024 * 1024, # Someone might have more than 50TB! + 'threshold' => 2 * 1024 * 1024, 'conversion' => 1024 * 1024, }, { @@ -68,7 +69,7 @@ my @size_thresholds = ( my $return_code_only = 0; -my $VERSION = '0.9.4'; +my $VERSION = '0.9.5'; # Some display blocks are disabled by default: $c->{'display'}{'Shows due to Auto Expire'} = 0; @@ -236,6 +237,34 @@ my @blocks = ( }, }, + # Info about the encoders after adding Blu-ray (Changeset 25058). + # The protocol version is from svn commit 25362 but is the closest commit + # for mythtv/libs/libmythdb/mythversion.h. + { + 'name' => 'Encoders', + 'type' => 'xpath', + 'xpath' => "//Status/Encoders/Encoder", + 'protocol_version' => [ ">= 58" ], + 'attrs' => [ qw/hostname id state connected/ ], + 'template' => "__hostname__ (__id__) - __state____connected__", + 'rewrite' => { + '/connected/' => { '1' => '', '0' => "${warning}(Disconnected)${normal}" }, + '/state/' => { + '^-1$' => "${warning}Error${normal}", + '^0$' => "${safe}Idle${normal}", + '^1$' => "${warning}Watching LiveTV${normal}", + '^2$' => "${warning}Watching Pre-recorded${normal}", + '^3$' => "${warning}Watching DVD${normal}", + '^4$' => "${warning}Watching Blu-ray${normal}", + '^5$' => "${warning}Watching Video${normal}", + '^6$' => "${warning}Watching Recording${normal}", + '^7$' => "${warning}Recording${normal}" }, + }, + 'filter' => { + 'state' => sub { return $c->{'encoder_skip_idle'} && $_[0] == 0 }, + }, + }, + # What programs (if any) are being recorded right now? { 'name' => 'Recording Now',