xmltv/grab/sd_json tv_grab_sd_json,1.20,1.21

Kevin Groeneveld <[email protected]> Fri, 15 Jul 2016 01:26:46 +0000
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/sd_json
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21252

Modified Files:
	tv_grab_sd_json 
Log Message:
tv_grab_sd_json: Do not add default category of "tvshow" for radio stations.


Index: tv_grab_sd_json
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/sd_json/tv_grab_sd_json,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -d -r1.20 -r1.21
*** tv_grab_sd_json	15 Jul 2016 01:25:43 -0000	1.20
--- tv_grab_sd_json	15 Jul 2016 01:26:44 -0000	1.21
***************
*** 1187,1191 ****
  
  sub get_program_category {
! 	my ($details) = @_;
  	my %seen;
  	my @result;
--- 1187,1191 ----
  
  sub get_program_category {
! 	my ($channel, $details) = @_;
  	my %seen;
  	my @result;
***************
*** 1215,1218 ****
--- 1215,1221 ----
  		add(\@result, 'sports', \%seen);
  	}
+ 	elsif($channel->{'isRadioStation'}) {
+ 		add(\@result, 'radio', \%seen);
+ 	}
  	else {
  		add(\@result, 'tvshow', \%seen);
***************
*** 1441,1445 ****
  
  		$w->write_programme({
! 			'channel'          => sprintf($channel_id_format, $channel),
  			'start'            => $start,
  			'stop'             => $stop,
--- 1444,1448 ----
  
  		$w->write_programme({
! 			'channel'          => sprintf($channel_id_format, $channel->{'stationID'}),
  			'start'            => $start,
  			'stop'             => $stop,
***************
*** 1449,1453 ****
  			'credits'          => get_program_credits($details),
  			'date'             => get_program_date($details),
! 			'category'         => get_program_category($details),
  #			'keyword'          => undef,
  #			'language'         => undef,
--- 1452,1456 ----
  			'credits'          => get_program_credits($details),
  			'date'             => get_program_date($details),
! 			'category'         => get_program_category($channel, $details),
  #			'keyword'          => undef,
  #			'language'         => undef,
***************
*** 1504,1508 ****
  		for my $schedule (values %{$cache_schedules->{$channel}}) {
  			for my $program (@{$schedule->{'programs'}}) {
! 				write_programme($w, $channel, $program, $cache_programs->{$program->{'programID'}});
  			}
  		}
--- 1507,1511 ----
  		for my $schedule (values %{$cache_schedules->{$channel}}) {
  			for my $program (@{$schedule->{'programs'}}) {
! 				write_programme($w, $channel_index{$channel}, $program, $cache_programs->{$program->{'programID'}});
  			}
  		}


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev