xmltv/grab/dtv_la tv_grab_dtv_la,1.6,1.7

Geoff <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/dtv_la
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv14473

Modified Files:
	tv_grab_dtv_la 
Log Message:
fix wrong channel icon in programme xml

Index: tv_grab_dtv_la
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/dtv_la/tv_grab_dtv_la,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** tv_grab_dtv_la	22 Apr 2014 16:43:02 -0000	1.6
--- tv_grab_dtv_la	12 Sep 2014 09:27:29 -0000	1.7
***************
*** 485,489 ****
  				if (!defined $div) {
  					# why is it not? 
! 					print STDERR 'No <h2> element for "eventId":'.$eventId.', "day":'.$_d.', "time":"'.$_h."\n";
  					next;
  				}
--- 485,489 ----
  				if (!defined $div) {
  					# why is it not? 
! 					print STDERR 'Warn: No programme description (no <h2> element for "eventId":'.$eventId.', "day":'.$_d.', "time":"'.$_h.")\n";
  					next;
  				}
***************
*** 704,708 ****
  			
  			if ( my $chan = $_->look_down('_tag' => 'a') ) {
! 				my ($chan_id, $chan_name, $chan_url, %chan_icon);
  				$chan_id = trim( $chan->look_down('_tag' => 'span')->as_text() );
  				$chan_url = $chan->attr('href');
--- 704,708 ----
  			
  			if ( my $chan = $_->look_down('_tag' => 'a') ) {
! 				my ($chan_id, $chan_name, $chan_url, %chan_icon) = ('', '', '', ());
  				$chan_id = trim( $chan->look_down('_tag' => 'span')->as_text() );
  				$chan_url = $chan->attr('href');
***************
*** 713,717 ****
  					$chan_icon{'height'} = $chan_img->attr('height')  if defined $chan_img->attr('height');
  				}
! 				
  				$chan_name="$chan_name ($chan_id)";
  				if (not exists  ${$channels} { $chan_id }) {
--- 713,717 ----
  					$chan_icon{'height'} = $chan_img->attr('height')  if defined $chan_img->attr('height');
  				}
! 
  				$chan_name="$chan_name ($chan_id)";
  				if (not exists  ${$channels} { $chan_id }) {
***************
*** 808,813 ****
  	foreach my $ch (@ch_all){
  		my $ch_num=$ch->{'channel-num'};
! 		
! 		my $chan_img = $table->look_down('_tag'=>'li')->look_down('_tag'=>'img', sub { $_[0]->parent()->attr('href'=>qr/ChannelDetail.aspx?id=$ch_num/) } );
  		if (defined $chan_img) {
  			my %chan_icon;
--- 808,815 ----
  	foreach my $ch (@ch_all){
  		my $ch_num=$ch->{'channel-num'};
! 		my $chan_img;
! 		if ( my $chan_a = $table->look_down('_tag'=>'a', 'href'=>qr/ChannelDetail.aspx\?id=$ch_num/) ){
! 			$chan_img = $chan_a->look_down('_tag'=>'img');
! 		}
  		if (defined $chan_img) {
  			my %chan_icon;
***************
*** 1033,1037 ****
  		id => $ch_xid,
  		'display-name' => [
! 		    [ encode($OUT_ENCODING, $ch_name) ],
  		    [ $ch_num ] ]
  	};
--- 1035,1039 ----
  		id => $ch_xid,
  		'display-name' => [
! 		    [ encode($OUT_ENCODING, $ch_name), $LANG ],
  		    [ $ch_num ] ]
  	};


------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.