xmltv/grab/fr tv_grab_fr,1.102,1.103
Nick Morrott <[email protected]> Sun, 05 Jul 2015 05:06:56 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/fr
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv2853/grab/fr
Modified Files:
tv_grab_fr
Log Message:
Fix --list-channels to retrieve all available channels without any user intervention. Customised channel selection is still available in --configure
Index: tv_grab_fr
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/fr/tv_grab_fr,v
retrieving revision 1.102
retrieving revision 1.103
diff -C2 -d -r1.102 -r1.103
*** tv_grab_fr 29 Jun 2015 16:24:28 -0000 1.102
--- tv_grab_fr 5 Jul 2015 05:06:54 -0000 1.103
***************
*** 449,475 ****
#***************************************************************************
if ($mode eq 'list-channels') {
! # Get a list of available channels, according to the grid type
my @gts = sort keys %GridType;
my @gtnames = map { $GridType{$_} } @gts;
- my @gtqs = map { "List channels for grid : $_?" } @gts;
- my @gtwant = ask_many_boolean(1, @gtqs);
-
my %seen;
foreach (@gts) {
- my $gtw = shift @gtwant;
my $gtname = shift @gtnames;
! if ($gtw) {
! say "Now getting grid : $_ \n";
! my %channels = get_channels( $gtname );
! #die 'no channels could be found' if (scalar(keys(%channels)) == 0);
! print STDERR 'WARNING: No channels could be found'."\n" if (scalar(keys(%channels)) == 0);
! foreach my $ch_did (sort(keys %channels)) {
! my $ch_xid = "C".$ch_did.".telepoche.com";
! $writer->write_channel({ id => $ch_xid,
! 'display-name' => [[encode_utf8( $channels{$ch_did}{name} )]],
! 'icon' => [{src=>$channels{$ch_did}{icon}}] })
! unless $seen{$ch_xid}++;
! }
! }
}
$writer->end();
--- 449,470 ----
#***************************************************************************
if ($mode eq 'list-channels') {
! # Get a list of all available channels, for all grid types
! #
! # Unlike channel configuration in --configure, we do not ask the user
! # for any input to select grid types, we list everything
my @gts = sort keys %GridType;
my @gtnames = map { $GridType{$_} } @gts;
my %seen;
foreach (@gts) {
my $gtname = shift @gtnames;
! my %channels = get_channels( $gtname );
! print STDERR 'WARNING: No channels could be found'."\n" if (scalar(keys(%channels)) == 0);
! foreach my $ch_did (sort(keys %channels)) {
! my $ch_xid = "C".$ch_did.".telepoche.com";
! $writer->write_channel({ id => $ch_xid,
! 'display-name' => [[encode_utf8( $channels{$ch_did}{name} )]],
! 'icon' => [{src=>$channels{$ch_did}{icon}}] })
! unless $seen{$ch_xid}++;
! }
}
$writer->end();
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/