[mythtv-users] Blank Zero Length Recording - Oh how I miss you.......
Morten Bøgeskov
mythtv-users at morten.bogeskov.dk
Tue Mar 26 09:58:07 UTC 2013
Quoting boehm100 at comcast.net:
> Hi,
>
> Yep I actually miss blank zero length recordings. Why? I new what
> they were. They notified me when Comcast got frisky and suffles the
> channel line up for no apparent reason. Now I get no notification
> other than my show go MISSING Missing missing. I don't tend to
> monitor my up coming recordings close enough to notice things go
> missing until a quarter of the series has passes. Major bummer!!
>
> Is there notification that I'm not seeing? An email address field I
> forgot to enter? Pop up warnings I disabled?
I've chosen this approach (running into the problem, that I promised
my children to record something while we were visiting family, and
when I got home, no recording => very annoyed children):
I changed the setup to: "Open DVBCard On Demand". And at some time
during the night(cron) check that the 1st card isn't busy for the next
15 min, then run a w_scan (apply appropriate arguments), and then run
a diff against the last known setup (the sed part is just pretty
printing).
in /etc/cron.d/mythtv:
30 6 * * * mythtv [ -e /usr/local/bin/myth-scan.bash ] &&
/usr/local/bin/myth-scan.bash
/usr/local/bin/myth-scan.bash:
#!/bin/bash
idle=`/usr/local/bin/mythtv-idle.pl`
if [ x$idle = x ]; then
echo "Cannot get idletime"
exit 1
elif [ $idle -lt 900 ]; then
echo "Cannot scan - tuner will be busy"
exit 1
else
/usr/bin/w_scan -qq -f c -c DK -S 1 -a 1 -X -C UTF-8 2>/dev/null
| sort >/var/lib/mythtv/channel-list.new
diff /var/lib/mythtv/channel-list.{current,new} | sed -e
'/^[^<>]/d' -e 's/^</-/' -e 's/^>/+/' | sort
mv /var/lib/mythtv/channel-list.{new,current}
fi
/usr/local/bin/mythtv-idle.pl:
#!/usr/bin/perl
use XML::DOM::XPath;
use LWP::UserAgent;
use Date::Parse;
use Time::Local;
use strict;
my $rest = $ARGV[0] || "localhost";
$rest .= ':6544' unless($rest=~m/:/);
my $recorders =
LWP::UserAgent->new()->get("http://".$rest."/Dvr/GetEncoderList");
die("Could not get GetEncoderList: " . $recorders->status_line . "\n")
unless($recorders->is_success);
my $dom = XML::DOM::Parser->new()->parse($recorders->decoded_content);
if($dom->findvalue('//Recording/Title')) {
print "0\n";
exit(0);
}
my $upcomming =
LWP::UserAgent->new()->get("http://".$rest."/Dvr/GetUpcomingList");
die("Could not get GetUpcomingList: " . $upcomming->status_line . "\n")
unless($upcomming->is_success);
$dom = XML::DOM::Parser->new()->parse($upcomming->decoded_content);
if(my $start = $dom->findvalue('//Programs/Program[1]/StartTime')) {
# TimeZone offset
my $tz = time();
$tz -= timegm(localtime($tz));
my $time = str2time($start) + $tz;
print $time - time(), "\n";
}
> Thanks,
> Jon
>
>
> _______________________________________________
> mythtv-users mailing list
> mythtv-users at mythtv.org
> http://www.mythtv.org/mailman/listinfo/mythtv-users
>
Morten
--
Two wrongs doesn't make a right, but two rights makes a U-turn.
More information about the mythtv-users
mailing list