From: Andrew Ruthven Date: Sun, 13 Jun 2010 10:08:52 +0000 (+1200) Subject: Allow skipping idle encoders, and make that the default. X-Git-Tag: 0.9.4~2 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=87d58258e654bf4e75cc35ca117ba2d9838839fa;p=mythtv-status.git Allow skipping idle encoders, and make that the default. People are starting to have more encoders, and also having streams enabled. So it is not uncommon to have 12 virtual encoders. If they're idle then people don't really care about them, so let's ignore them. --- diff --git a/ChangeLog b/ChangeLog index 5750608..2d2b941 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +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. 2010-04-29 Andrew Ruthven Handle the case where the disk space units returned from the server are different. i.e., total is in GB and used is in MB. diff --git a/bin/mythtv-status b/bin/mythtv-status index ab6449b..1119887 100755 --- a/bin/mythtv-status +++ b/bin/mythtv-status @@ -36,6 +36,7 @@ $c->{'port'} ||= "6544"; $c->{'description'} ||= 0; $c->{'episode'} ||= 0; $c->{'encoder_details'} ||= 0; +$c->{'encoder_skip_idle'} ||= 1; $c->{'colour'} ||= 0; #my %display; # my @email; @@ -87,6 +88,7 @@ GetOptions( 'guide-days-warn=i' => \$c->{'guide_days_warn'}, 'auto-expire-count=i' => \$c->{'auto_expire_count'}, 'recording-in-warn=i' => \$c->{'recording_in_warn'}, + 'encoder-skip-idle!' => \$c->{'encoder_skip_idle'}, 'status!' => \$c->{'display'}{'Status'}, 'encoders!' => \$c->{'display'}{'Encoders'}, @@ -203,7 +205,10 @@ my @blocks = ( '^2$' => "${warning}Watching Pre-recorded${normal}", '^3$' => "${warning}Watching Recording${normal}", '^4$' => "${warning}Recording${normal}" }, - } + }, + 'filter' => { + 'state' => sub { return $c->{'encoder_skip_idle'} && $_[0] == 0 }, + }, }, # Info about the encoders after TV OSD Declutter (Changeset 20037). @@ -225,7 +230,10 @@ my @blocks = ( '^4$' => "${warning}Watching Video${normal}", '^5$' => "${warning}Watching Recording${normal}", '^6$' => "${warning}Recording${normal}" }, - } + }, + 'filter' => { + 'state' => sub { return $c->{'encoder_skip_idle'} && $_[0] == 0 }, + }, }, # What programs (if any) are being recorded right now?