From: Andrew Ruthven Date: Fri, 7 Dec 2007 04:13:55 +0000 (+1300) Subject: Merge branch 'release-0.5' X-Git-Tag: 0.6.0~16 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=35879f12f460546b43d5f133b1f5a7e6e56804df;p=mythtv-status.git Merge branch 'release-0.5' Conflicts: ChangeLog bin/mythtv-status --- 35879f12f460546b43d5f133b1f5a7e6e56804df diff --cc ChangeLog index 32d5571,0e76a94..db80d07 --- a/ChangeLog +++ b/ChangeLog @@@ -1,17 -1,20 +1,28 @@@ + 2007-12-07 Andrew Ruthven + Better suppress warnings from the MythTV Perl API if we can't access + the database. + + 2007-12-06 Andrew Ruthven + Be more paranoid about handling error conditions in the + substitution code. + Handle the case where there is no next recording scheduled + in a nicer fashion. + Release version 0.5.3. + +2007-12-02 Andrew Ruthven + Allow sending emails only if there is low disk space or recording - conflicts. ++ conflicts. (0.6) + 2007-11-28 Andrew Ruthven Be more wary about processing what the backend has sent us. - This includes cleaning up some invalid UTF-8 characters. + This includes cleaning up some invalid UTF-8 characters. Add support for reading XML from a file. Be a bit more forgiving on the XML we're receiving. Release version 0.5.2. - Show how much disk space is used - currently only total. - Rename "Time till next recording" to "Next Recording In". ++ Show how much disk space is used - currently only total. (0.6) ++ Rename "Time till next recording" to "Next Recording In". (0.6) + Put all the one liners together in the output and make them line - up nicely. ++ up nicely. (0.6) 2007-11-23 Andrew Ruthven Don't set the background when changing the colour. diff --cc bin/mythtv-status index 27c6ef8,3eb521f..c2bacdd --- a/bin/mythtv-status +++ b/bin/mythtv-status @@@ -29,9 -29,8 +29,9 @@@ my $email_only_on_alert = 0 my $help = undef; my $xml_file = undef; my $verbose = 0; +my $disk_space_warn = 95; # Percent to warn at. - my $VERSION = '0.5.1'; + my $VERSION = '0.5.3'; GetOptions( 'c|colour|color' => \$colour, @@@ -104,10 -103,7 +104,10 @@@ my %defaults = } ); +# The time of the next scheduled recording. - my $next_time = undef; + my $next_time = 'Never'; +# Are there any alerts that should be notified via email? +my @alerts = (); # The blocks of output which we might generate. my @blocks = ( @@@ -171,14 -159,14 +171,14 @@@ 'hide' => 'after', 'subs' => { 'find_next' => sub { - my $vars = shift; + my $vars = shift; return - if defined $next_time && $next_time eq 'now'; + if defined $next_time && $next_time eq 'now'; my $date = ParseDate($vars->{'startTime'}); - if (! defined $next_time || Date_Cmp($date, $next_time) < 0) { - $next_time = $date - }; + if ($next_time eq 'Never' || Date_Cmp($date, $next_time) < 0) { + $next_time = $date + }; } } },