xmltv/grab/uk_rt tv_grab_uk_rt,1.31,1.32

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

Modified Files:
	tv_grab_uk_rt 
Log Message:
Allow overriding of the default Radio Times listings location for testing purposes

Index: tv_grab_uk_rt
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_rt/tv_grab_uk_rt,v
retrieving revision 1.31
retrieving revision 1.32
diff -C2 -d -r1.31 -r1.32
*** tv_grab_uk_rt	1 Dec 2013 02:45:12 -0000	1.31
--- tv_grab_uk_rt	1 Dec 2013 03:29:58 -0000	1.32
***************
*** 53,59 ****
  }
  
! # Location of Radio Times channel index file
! my $rt_root_dir = 'http://xmltv.radiotimes.com/xmltv';
! my $rt_channels_uri = "$rt_root_dir/channels.dat";
  
  # The format of the Radio Times source data (set to strict UTF-8)
--- 53,59 ----
  }
  
! # Default location of Radio Times channel index file
! my $rt_listings_root = 'http://xmltv.radiotimes.com/xmltv';
! my $rt_channels_uri  = "$rt_listings_root/channels.dat";
  
  # The format of the Radio Times source data (set to strict UTF-8)
***************
*** 661,664 ****
--- 661,670 ----
      # format. We process the list of available channels and check for
      # presence of duplicate IDs or names.
+ 
+     # TESTING: config-file key-value to override default location of channels.dat
+     if (defined( $conf->{'rt_listings_root'} )) {
+         $rt_channels_uri = $conf->{'rt_listings_root'}[0] . "/channels.dat";
+     }
+ 
      #
      # Grab the octets
***************
*** 954,957 ****
--- 960,968 ----
      $need_final_update = 0;
  
+     # TESTING: config-file key-value to override default location of channel listings
+     if (defined( $conf->{'rt_listings_root'} )) {
+         $rt_listings_root = $conf->{'rt_listings_root'}[0];
+     }
+ 
      # Process all of the channels we want listings for
      WANTED_CH:
***************
*** 966,970 ****
  
          # Create the channel's URL based on ID
!         my $rt_listings_uri = "$rt_root_dir/$rt_id.dat";
          # Include the URL in any warn/die messages
          local $SIG{__DIE__} = sub { die "$rt_listings_uri: $_[0]" };
--- 977,981 ----
  
          # Create the channel's URL based on ID
!         my $rt_listings_uri = "$rt_listings_root/$rt_id.dat";
          # Include the URL in any warn/die messages
          local $SIG{__DIE__} = sub { die "$rt_listings_uri: $_[0]" };


------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT 
organizations don't have a clear picture of how application performance 
affects their revenue. With AppDynamics, you get 100% visibility into your 
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349351&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.