]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
And make sure that "time till next recording" works with the new sub handling.
authorAndrew Ruthven <andrew@etc.gen.nz>
Tue, 20 Nov 2007 17:38:26 +0000 (06:38 +1300)
committerAndrew Ruthven <andrew@cyclops.etc.gen.nz>
Tue, 20 Nov 2007 17:38:26 +0000 (06:38 +1300)
bin/mythtv-status

index 072a1c63851294fcca37dc995ec3ac81f8301bae..c427f15905dff9c2d07b86b52d48041112a4e214 100755 (executable)
@@ -170,6 +170,9 @@ my @blocks = (
     },
     'filter' =>  {
       'next_time' => sub { return $_[0] eq 'now' }
+    },
+    'sub' => sub {
+      return substitute_vars($_[0], { 'next_time' => $next_time });
     }
   },
 
@@ -218,9 +221,6 @@ for my $block (@blocks) {
 
     $output = &{ $block->{'sub'} }($block)
       if defined $block->{'sub'};
-
-  } elsif ($block->{'type'} eq 'sub') {
-    $output = substitute_vars($block, { 'next_time' => $next_time });
   }
 
   if (defined $output && $output ne '' && ! defined $hide) {