xmltv/grab/uk_atlas tv_grab_uk_atlas,1.11,1.12
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/uk_atlas
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv26864
Modified Files:
tv_grab_uk_atlas
Log Message:
Fix --list-channels so it uses the conf hash
Index: tv_grab_uk_atlas
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_atlas/tv_grab_uk_atlas,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** tv_grab_uk_atlas 5 Dec 2013 16:42:09 -0000 1.11
--- tv_grab_uk_atlas 14 Dec 2013 16:15:14 -0000 1.12
***************
*** 824,854 ****
}
elsif ($opt->{'list-channels'}) {
! # Ask the user for the Platform and Region code to get channels for
! if (!defined $selected_region) {
! fetch_platforms();
! my @choices = ();
! foreach my $p (@platforms) {
! my %platform = %$p;
! push @choices, $platform{'id'} . ' | ' . $platform{'title'} . ' ' . $platform{'countries'};
! }
! my $platform = ask_choice("\n'Choose your viewing platform'", $choices[0], @choices); # 'ask' forces us to have a valid default value!
! my ($platform_id) = $platform =~ /^(.*?)\s|/;
! $selected_platform = $platform_id;
! @choices = ();
! foreach my $p (@platforms) {
! my %platform = %$p;
! next unless $platform{'id'} eq $platform_id;
! foreach my $r (@{$platform{'regions'}}) {
! my %region = %$r;
! push @choices, $region{'id'} . ' | ' . $region{'title'};
! }
! }
! if (@choices > 0) {
! my $region = ask_choice("\n'Choose your viewing region'", $choices[0], @choices);
! my ($region_id) = $region =~ /^(.*?)\s|/;
! #
! $selected_region = $region_id;
! }
! }
# Need to load our 'map' file. --list-channels doesn't reach that part of the code
--- 824,829 ----
}
elsif ($opt->{'list-channels'}) {
! $selected_platform = $conf->{'platform'}[0];
! $selected_region = $conf->{'region'}[0];
# Need to load our 'map' file. --list-channels doesn't reach that part of the code
***************
*** 876,880 ****
foreach my $url (@urls) {
! print $url ."\n" if ($opt->{debug});
# Fetch the page
--- 851,855 ----
foreach my $url (@urls) {
! print STDERR $url ."\n" if ($opt->{debug});
# Fetch the page
***************
*** 957,961 ****
# http://atlas.metabroadcast.com/3.0/channel_groups.json?type=platform
my $url = $ROOT_URL.'channel_groups.json?type=platform';
! #print $url ."\n";
@platforms = ();
--- 932,936 ----
# http://atlas.metabroadcast.com/3.0/channel_groups.json?type=platform
my $url = $ROOT_URL.'channel_groups.json?type=platform';
! #print STDERR $url ."\n";
@platforms = ();
------------------------------------------------------------------------------
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=84349831&iu=/4140/ostg.clktrk