]> git.etc.gen.nz Git - mythtv-status.git/commitdiff
Clean off unneeded precision
authorAndrew Ruthven <andrew@etc.gen.nz>
Thu, 6 Dec 2018 21:30:14 +0000 (10:30 +1300)
committerAndrew Ruthven <andrew@etc.gen.nz>
Thu, 6 Dec 2018 21:30:14 +0000 (10:30 +1300)
bin/mythtv-status

index d2060384e3bb1b0a4262fa082af3c69affe46e01..5c82378b63134af2096d53feec2141526f0c4dbf 100755 (executable)
@@ -1028,6 +1028,7 @@ sub substitute_vars {
         if (defined $vars->{$key} && defined $unit->{'threshold'}) {
           if ($vars->{$key} > $unit->{'threshold'}) {
             $vars->{$key} = sprintf("%.1f", $vars->{$key} / $unit->{'conversion'});
+            $vars->{$key} =~ s/\.0//;
             $vars->{"${key}_unit"} = $unit->{'unit'};
 
             last;