xmltv/grab/pt tv_grab_pt,1.57,1.58
Geoff <[email protected]> Sat, 26 Mar 2016 15:51:54 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/pt
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8535/xmltv/grab/pt
Modified Files:
tv_grab_pt
Log Message:
Output a warning and skip channels no longer available (else XMLTV.pm breaks)
Index: tv_grab_pt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/pt/tv_grab_pt,v
retrieving revision 1.57
retrieving revision 1.58
diff -C2 -d -r1.57 -r1.58
*** tv_grab_pt 10 Aug 2015 10:41:00 -0000 1.57
--- tv_grab_pt 26 Mar 2016 15:51:52 -0000 1.58
***************
*** 307,322 ****
my @to_get;
! # the order in which we fetch the channels matters
! # This progress bar is for both downloading and parsing. Maybe
! # they could be separate.
! #
!
! my $bar = new XMLTV::ProgressBar('getting listings', scalar @channels)
! if not $opt_quiet;
!
! # write the <channels> elements
foreach my $ch_did (@channels) {
die if not defined $ch_did;
my $ch_name=$channels{$ch_did}->{'channel-name'};
my $channel = { 'id' => $channels{$ch_did}->{'id'},
--- 307,320 ----
my @to_get;
! # Write the channels elements
foreach my $ch_did (@channels) {
die if not defined $ch_did;
+ # avoid XMLTV barfing when channel is no longer available
+ if (!defined $channels{$ch_did}) {
+ print STDERR "\nChannel $ch_did not found in current channels lineup \n";
+ next;
+ }
+
my $ch_name=$channels{$ch_did}->{'channel-name'};
my $channel = { 'id' => $channels{$ch_did}->{'id'},
***************
*** 330,333 ****
--- 328,339 ----
+ # the order in which we fetch the channels matters
+ # This progress bar is for both downloading and parsing. Maybe
+ # they could be separate.
+ #
+
+ my $bar = new XMLTV::ProgressBar('getting listings', scalar @channels)
+ if not $opt_quiet;
+
# time limits for grab
my $today_date = DateTime->today(time_zone => 'Europe/Lisbon');
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785351&iu=/4140