diff -Nru xmltv-0.5.61/debian/bzr-builder.manifest xmltv-0.5.61/debian/bzr-builder.manifest --- xmltv-0.5.61/debian/bzr-builder.manifest 2012-04-06 22:48:38.000000000 +0000 +++ xmltv-0.5.61/debian/bzr-builder.manifest 2012-04-10 12:12:17.000000000 +0000 @@ -1,3 +1,3 @@ -# bzr-builder format 0.3 deb-version {debupstream}-1+r4218p158 -lp:~vcs-imports/xmltv/trunk revid:knowledgejunkie-20120406104525-2vwqlvd7a4nh5qv3 +# bzr-builder format 0.3 deb-version {debupstream}-1+r4221p158 +lp:~vcs-imports/xmltv/trunk revid:knowledgejunkie-20120410083629-xmw7qv1a8tj6y1x1 nest-part packaging lp:~mythbuntu/xmltv/xmltv-packaging-import debian debian revid:mario_limonciello@dell.com-20120106162211-1t1ttxjf36wjj9kk diff -Nru xmltv-0.5.61/debian/changelog xmltv-0.5.61/debian/changelog --- xmltv-0.5.61/debian/changelog 2012-04-06 22:48:38.000000000 +0000 +++ xmltv-0.5.61/debian/changelog 2012-04-10 12:12:17.000000000 +0000 @@ -1,8 +1,8 @@ -xmltv (0.5.61-1+r4218p158~maverick1) UNRELEASED; urgency=low +xmltv (0.5.61-1+r4221p158~maverick1) maverick; urgency=low * Auto build. - -- Launchpad Package Builder Fri, 06 Apr 2012 22:48:38 +0000 + -- Launchpad Package Builder Tue, 10 Apr 2012 12:12:17 +0000 xmltv (0.5.61-2) UNRELEASED; urgency=low diff -Nru xmltv-0.5.61/lib/Configure.pm xmltv-0.5.61/lib/Configure.pm --- xmltv-0.5.61/lib/Configure.pm 2012-04-06 22:48:33.000000000 +0000 +++ xmltv-0.5.61/lib/Configure.pm 2012-04-10 12:12:11.000000000 +0000 @@ -116,13 +116,17 @@ foreach my $key (keys %{$conf}) { next if $key eq "channel"; + next if $key eq "lineup"; foreach my $value (@{$conf->{$key}}) { print OUT "$key=$value\n"; } } - if( exists( $conf->{channel} ) ) + if (exists $conf->{lineup}) { + print OUT "lineup=$conf->{lineup}[0]\n"; + } + elsif( exists( $conf->{channel} ) ) { foreach my $value (@{$conf->{channel}}) { @@ -173,9 +177,14 @@ $nextstage = configure_stage( $stage, $conffile, $lang ); } while ($nextstage ne "select-channels" ); - # No more nextstage. Let the user select channels. - my $channels = &$listsub( LoadConfig( $conffile ), $opt ); - select_channels( $channels, $conffile, $lang ) + # No more nextstage. Let the user select channels. Do not present + # channel selection if the configuration is using lineups where + # channels are determined automatically + my $conf = LoadConfig( $conffile ); + if (! exists $conf->{lineup}) { + my $channels = &$listsub( $conf, $opt ); + select_channels( $channels, $conffile, $lang ); + } } sub configure_stage diff -Nru xmltv-0.5.61/lib/Options.pm xmltv-0.5.61/lib/Options.pm --- xmltv-0.5.61/lib/Options.pm 2012-04-06 22:48:33.000000000 +0000 +++ xmltv-0.5.61/lib/Options.pm 2012-04-10 12:12:11.000000000 +0000 @@ -69,7 +69,7 @@ preferredmethod /], lineups => [qw/ - lineup=s + get-lineup list-lineups /], ); @@ -108,7 +108,7 @@ preferredmethod => 0, }, lineups => { - lineup => undef, + 'get-lineup' => 0, 'list-lineups' => 0, } ); @@ -125,7 +125,7 @@ my( $opt, $conf ) = ParseOptions( { grabber_name => 'tv_grab_test', - version => '$Id: Options.pm,v 1.22 2012/02/13 10:46:43 knowledgejunkie Exp $', + version => '$Id: Options.pm,v 1.23 2012/04/10 08:44:21 knowledgejunkie Exp $', description => 'Sweden (tv.swedb.se)', capabilities => [qw/baseline manualconfig apiconfig lineups/], stage_sub => \&config_stage, @@ -187,7 +187,7 @@ =item --list-lineups -=item --lineup +=item --get-lineup =back @@ -299,7 +299,7 @@ my( $opt, $conf ) = ParseOptions( { grabber_name => 'tv_grab_test', - version => '$Id: Options.pm,v 1.22 2012/02/13 10:46:43 knowledgejunkie Exp $', + version => '$Id: Options.pm,v 1.23 2012/04/10 08:44:21 knowledgejunkie Exp $', description => 'Sweden (tv.swedb.se)', capabilities => [qw/baseline manualconfig apiconfig preferredmethod/], stage_sub => \&config_stage, @@ -453,6 +453,13 @@ exit 0; } + # no config needed to list lineups supported by grabber + if( $opt->{"list-lineups"} ) + { + print &{$p->{list_lineups_sub}}($opt); + exit 0; + } + my $conf = LoadConfig( $opt->{'config-file'} ); if( not defined( $conf ) and defined( $p->{load_old_config_sub} ) ) { @@ -494,19 +501,15 @@ exit 0; } - if( $opt->{"list-lineups"} ) + if( $opt->{"get-lineup"} ) { - print &{$p->{list_lineups_sub}}($conf,$opt); - exit 0; - } - - if( $opt->{"lineup"} ) - { - if ( (not defined $opt->{lineup}) or ($opt->{lineup} eq '') ) + if( not defined( $conf ) ) { - print STDERR "You need to provide a valid lineup ID.\n"; - exit 1; - } + print STDERR "You need to configure the grabber before you can output " . + "your chosen lineup.\n"; + exit 1; + } + print &{$p->{get_lineup_sub}}($conf,$opt); exit 0; } @@ -569,9 +572,9 @@ if( supports( "lineups", $p ) ) { print qq/ -$gn --list-lineups +$gn --list-lineups [--output FILE] -$gn --lineup LINEUP_ID [--output FILE] +$gn --get-lineup [--output FILE] /; } } diff -Nru xmltv-0.5.61/xmltv-lineups.xsd xmltv-0.5.61/xmltv-lineups.xsd --- xmltv-0.5.61/xmltv-lineups.xsd 2012-04-06 22:48:33.000000000 +0000 +++ xmltv-0.5.61/xmltv-lineups.xsd 2012-04-10 12:12:11.000000000 +0000 @@ -13,6 +13,7 @@ + @@ -24,6 +25,7 @@ + @@ -161,6 +163,7 @@ + @@ -170,6 +173,15 @@ + + + + + + + + +