xmltv/lib Clumps.pm, 1.15, 1.16 ValidateFile.pm, 1.22, 1.23 ProgressBar.pm, 1.1, 1.2 PreferredMethod.pm, 1.2, 1.3 XMLTV.pm.in, 1.169, 1.170 IMDB.pm, 1.68, 1.69 Supplement.pm.in, 1.16, 1.17 exe_wrap.pl, 1.96, 1.97 Options.pm, 1.28, 1.29 Date.pm, 1.6, 1.7 Configure.pm, 1.9, 1.10 Summarize.pm, 1.5, 1.6 exe_opt.pl, 1.29, 1.30 GUI.pm, 1.3, 1.4 set_share_dir.pl, 1.5, 1.6 TZ.pm, 1.18, 1.19 ValidateGrabber.pm, 1.18, 1.19
Nick Morrott <[email protected]> Sun, 12 Jul 2015 00:59:03 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/lib
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv21723/lib
Modified Files:
Clumps.pm ValidateFile.pm ProgressBar.pm PreferredMethod.pm
XMLTV.pm.in IMDB.pm Supplement.pm.in exe_wrap.pl Options.pm
Date.pm Configure.pm Summarize.pm exe_opt.pl GUI.pm
set_share_dir.pl TZ.pm ValidateGrabber.pm
Log Message:
Whitespace: remove trailing whitespace
Index: PreferredMethod.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/PreferredMethod.pm,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** PreferredMethod.pm 24 Apr 2010 12:28:22 -0000 1.2
--- PreferredMethod.pm 12 Jul 2015 00:59:01 -0000 1.3
***************
*** 36,40 ****
}
return if not $seen;
!
print $method . "\n";
exit();
--- 36,40 ----
}
return if not $seen;
!
print $method . "\n";
exit();
Index: Clumps.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Clumps.pm,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** Clumps.pm 6 Jan 2004 20:42:36 -0000 1.15
--- Clumps.pm 12 Jul 2015 00:59:01 -0000 1.16
***************
*** 260,264 ****
@new = sort by_date @$new;
nuke_from_rel($rel, $orig);
!
if (@relatives) {
# Find where the original programme slotted into the clump
--- 260,264 ----
@new = sort by_date @$new;
nuke_from_rel($rel, $orig);
!
if (@relatives) {
# Find where the original programme slotted into the clump
Index: TZ.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/TZ.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** TZ.pm 17 Oct 2014 14:30:52 -0000 1.18
--- TZ.pm 12 Jul 2015 00:59:01 -0000 1.19
***************
*** 84,92 ****
} else {
$tz = "etc/gmt$1$2";
! }
}
return $tz;
}
!
# tz_to_num()
--- 84,92 ----
} else {
$tz = "etc/gmt$1$2";
! }
}
return $tz;
}
!
# tz_to_num()
Index: GUI.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/GUI.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** GUI.pm 24 Apr 2010 12:28:22 -0000 1.3
--- GUI.pm 12 Jul 2015 00:59:01 -0000 1.4
***************
*** 9,13 ****
use XMLTV::GUI;
my $gui_type = get_gui_type($opt_gui);
!
where $opt_gui is the commandline option given for --gui and $gui_type is
one of 'term+progressbar', 'term' and 'tk'.
--- 9,13 ----
use XMLTV::GUI;
my $gui_type = get_gui_type($opt_gui);
!
where $opt_gui is the commandline option given for --gui and $gui_type is
one of 'term+progressbar', 'term' and 'tk'.
***************
*** 50,54 ****
sub get_gui_type( $ ) {
my $opt_gui = shift;
!
# If the user passed in a --gui option, work on that basis, otherwise use
# the environment variable
--- 50,54 ----
sub get_gui_type( $ ) {
my $opt_gui = shift;
!
# If the user passed in a --gui option, work on that basis, otherwise use
# the environment variable
***************
*** 56,60 ****
return _get_specified_gui_type($opt_gui);
} else {
! return _get_specified_gui_type($ENV{XMLTV_GUI});
}
}
--- 56,60 ----
return _get_specified_gui_type($opt_gui);
} else {
! return _get_specified_gui_type($ENV{XMLTV_GUI});
}
}
***************
*** 62,68 ****
sub _get_specified_gui_type( $ ) {
my $spec_gui = shift;
!
# Return the best match to the specified gui if it is available
!
# If we haven't got windows, or we were asked for terminal, we do
# terminal stylee.
--- 62,68 ----
sub _get_specified_gui_type( $ ) {
my $spec_gui = shift;
!
# Return the best match to the specified gui if it is available
!
# If we haven't got windows, or we were asked for terminal, we do
# terminal stylee.
***************
*** 70,74 ****
or !defined($spec_gui)
or $spec_gui =~ /^term/i) {
!
# Check whether we at least have the terminal progress bar
if (defined($spec_gui) && $spec_gui =~ /^termnoprogressbar$/i
--- 70,74 ----
or !defined($spec_gui)
or $spec_gui =~ /^term/i) {
!
# Check whether we at least have the terminal progress bar
if (defined($spec_gui) && $spec_gui =~ /^termnoprogressbar$/i
***************
*** 76,80 ****
return 'term';
} else {
! return 'term+progressbar';
}
# Now try Tk first
--- 76,80 ----
return 'term';
} else {
! return 'term+progressbar';
}
# Now try Tk first
***************
*** 85,94 ****
warn "The Tk gui library is unavailable. Reverting to terminal";
return 'term';
! }
# And finally give up and go to terminal
} else {
warn "Unknown gui type requested: '$spec_gui'. Reverting to terminal";
!
! return 'term';
}
}
--- 85,94 ----
warn "The Tk gui library is unavailable. Reverting to terminal";
return 'term';
! }
# And finally give up and go to terminal
} else {
warn "Unknown gui type requested: '$spec_gui'. Reverting to terminal";
!
! return 'term';
}
}
Index: Supplement.pm.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Supplement.pm.in,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** Supplement.pm.in 8 Jan 2014 12:01:21 -0000 1.16
--- Supplement.pm.in 12 Jul 2015 00:59:01 -0000 1.17
***************
*** 10,14 ****
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
--- 10,14 ----
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
***************
*** 58,62 ****
if ($^O eq 'MSWin32') {
require Win32;
! Win32->import( qw(CSIDL_LOCAL_APPDATA) );
$base = Win32::GetFolderPath( CSIDL_LOCAL_APPDATA() );
$base =~ s/ /\ /g;
--- 58,62 ----
if ($^O eq 'MSWin32') {
require Win32;
! Win32->import( qw(CSIDL_LOCAL_APPDATA) );
$base = Win32::GetFolderPath( CSIDL_LOCAL_APPDATA() );
$base =~ s/ /\ /g;
***************
*** 107,111 ****
=item GetSupplement
! Load a supplement file and return it as a string. Takes two parameters:
directory and filename.
--- 107,111 ----
=item GetSupplement
! Load a supplement file and return it as a string. Takes two parameters:
directory and filename.
***************
*** 153,157 ****
push @supplement_array, $_;
}
!
return \@supplement_array;
}
--- 153,157 ----
push @supplement_array, $_;
}
!
return \@supplement_array;
}
***************
*** 196,200 ****
sub GetSupplementUrl {
my( $directory, $name ) = @_;
!
create_cachedir() if not defined $cachedir;
init_ua() if not defined $ua;
--- 196,200 ----
sub GetSupplementUrl {
my( $directory, $name ) = @_;
!
create_cachedir() if not defined $cachedir;
init_ua() if not defined $ua;
***************
*** 231,235 ****
# The right url is stored in the cache.
! if( defined( $cached ) and defined( $meta->{'LastUpdated'} )
and 1*60*60 > (time - $meta->{'LastUpdated'} ) ) {
d("LastUpdated ok. Using cache.");
--- 231,235 ----
# The right url is stored in the cache.
! if( defined( $cached ) and defined( $meta->{'LastUpdated'} )
and 1*60*60 > (time - $meta->{'LastUpdated'} ) ) {
d("LastUpdated ok. Using cache.");
***************
*** 238,242 ****
if( defined( $cached ) ) {
! $p{'If-Modified-Since'} = $meta->{'Last-Modified'}
if defined $meta->{'Last-Modified'};
$p{'If-None-Match'} = $meta->{ETag}
--- 238,242 ----
if( defined( $cached ) ) {
! $p{'If-Modified-Since'} = $meta->{'Last-Modified'}
if defined $meta->{'Last-Modified'};
$p{'If-None-Match'} = $meta->{ETag}
***************
*** 264,268 ****
}
else {
! print STDERR "XMLTV::Supplement: Failed to fetch $url: " .
$resp->status_line . ".\n";
exit 1;
--- 264,268 ----
}
else {
! print STDERR "XMLTV::Supplement: Failed to fetch $url: " .
$resp->status_line . ".\n";
exit 1;
***************
*** 318,322 ****
print OUT "Url $url\n";
! if( defined $resp->header( 'Last-Modified' ) ) {
print OUT "Last-Modified " . $resp->header( 'Last-Modified' ) . "\n";
}
--- 318,322 ----
print OUT "Url $url\n";
! if( defined $resp->header( 'Last-Modified' ) ) {
print OUT "Last-Modified " . $resp->header( 'Last-Modified' ) . "\n";
}
***************
*** 400,404 ****
The XMLTV_SUPPLEMENT environment variable can be used to tell the
! module where the supplementary files are found.
XMLTV_SUPPLEMENT=/usr/share/xmltv
--- 400,404 ----
The XMLTV_SUPPLEMENT environment variable can be used to tell the
! module where the supplementary files are found.
XMLTV_SUPPLEMENT=/usr/share/xmltv
Index: ValidateFile.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/ValidateFile.pm,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
*** ValidateFile.pm 22 Jun 2011 19:04:03 -0000 1.22
--- ValidateFile.pm 12 Jul 2015 00:59:01 -0000 1.23
***************
*** 6,10 ****
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
--- 6,10 ----
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
***************
*** 28,32 ****
=head1 DESCRIPTION
! Utility library that validates that a file is correct according to
http://wiki.xmltv.org/index.php/XMLTVFormat.
--- 28,32 ----
=head1 DESCRIPTION
! Utility library that validates that a file is correct according to
http://wiki.xmltv.org/index.php/XMLTVFormat.
***************
*** 49,56 ****
=cut
! sub LoadDtd {
my( $dtd_file ) = @_;
! my $dtd_str = read_file($dtd_file)
or die "Failed to read $dtd_file";
--- 49,56 ----
=cut
! sub LoadDtd {
my( $dtd_file ) = @_;
! my $dtd_str = read_file($dtd_file)
or die "Failed to read $dtd_file";
***************
*** 65,69 ****
ValidateFile returns a list of errors that it found with the file. Each
! error takes the form of a keyword:
ValidateFile checks the following:
--- 65,69 ----
ValidateFile returns a list of errors that it found with the file. Each
! error takes the form of a keyword:
ValidateFile checks the following:
***************
*** 93,102 ****
=item channelnoprogramme
! There are no programme entries for one of the channels listed with a
channel-entry.
=item invalidid
! An xmltvid does not look like a proper id, i.e. it does not match
/^[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+$/.
--- 93,102 ----
=item channelnoprogramme
! There are no programme entries for one of the channels listed with a
channel-entry.
=item invalidid
! An xmltvid does not look like a proper id, i.e. it does not match
/^[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+$/.
***************
*** 143,151 ****
If no errors are found, an empty list is returned.
! =cut
my %errors;
my %timezoneerrors;
!
sub ValidateFile {
my( $file ) = @_;
--- 143,151 ----
If no errors are found, an empty list is returned.
! =cut
my %errors;
my %timezoneerrors;
!
sub ValidateFile {
my( $file ) = @_;
***************
*** 164,176 ****
my $doc;
!
eval { $doc = $parser->parse_file( $file ); };
!
if ( $@ ) {
w( "The file is not well-formed xml:\n$@ ", 'notwell');
return (keys %errors);
}
!
! eval { $doc->validate( $dtd ) };
if ( $@ ) {
w( "The file is not valid according to the xmltv dtd:\n $@",
--- 164,176 ----
my $doc;
!
eval { $doc = $parser->parse_file( $file ); };
!
if ( $@ ) {
w( "The file is not well-formed xml:\n$@ ", 'notwell');
return (keys %errors);
}
!
! eval { $doc->validate( $dtd ) };
if ( $@ ) {
w( "The file is not valid according to the xmltv dtd:\n $@",
***************
*** 186,196 ****
verify_entities( $file );
! my $w = sub {
my( $p, $msg, $id ) = @_;
w( "Line " . $p->line_number() . " $msg", $id );
};
!
my %channels;
!
my $ns = $doc->find( "//channel" );
--- 186,196 ----
verify_entities( $file );
! my $w = sub {
my( $p, $msg, $id ) = @_;
w( "Line " . $p->line_number() . " $msg", $id );
};
!
my %channels;
!
my $ns = $doc->find( "//channel" );
***************
*** 198,211 ****
my $channelid = $ch->findvalue('@id');
my $display_name = $ch->findvalue('display-name/text()');
!
$w->( $ch, "Invalid channel-id '$channelid'", 'invalidid' )
if $channelid !~ /^[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+$/;
!
$w->( $ch, "Duplicate channel-tag for '$channelid'", 'duplicateid' )
if defined( $channels{$channelid} );
!
$channels{$channelid} = 0;
}
!
$ns = $doc->find( "//programme" );
if ($ns->size() == 0) {
--- 198,211 ----
my $channelid = $ch->findvalue('@id');
my $display_name = $ch->findvalue('display-name/text()');
!
$w->( $ch, "Invalid channel-id '$channelid'", 'invalidid' )
if $channelid !~ /^[-a-zA-Z0-9]+(\.[-a-zA-Z0-9]+)+$/;
!
$w->( $ch, "Duplicate channel-tag for '$channelid'", 'duplicateid' )
if defined( $channels{$channelid} );
!
$channels{$channelid} = 0;
}
!
$ns = $doc->find( "//programme" );
if ($ns->size() == 0) {
***************
*** 232,245 ****
$channels{$channelid}++;
!
! $w->( $p, "Empty title", 'emptytitle' )
if $title =~ /^\s*$/;
! $w->( $p, "Empty description", 'emptydescription' )
if defined($desc) and $desc =~ /^\s*$/;
!
$w->( $p, "Invalid start-time '$start'", 'badstart' )
if not verify_time( $start );
!
$w->( $p, "Invalid stop-time '$stop'", 'badstop' )
if $stop ne "" and not verify_time( $stop );
--- 232,245 ----
$channels{$channelid}++;
!
! $w->( $p, "Empty title", 'emptytitle' )
if $title =~ /^\s*$/;
! $w->( $p, "Empty description", 'emptydescription' )
if defined($desc) and $desc =~ /^\s*$/;
!
$w->( $p, "Invalid start-time '$start'", 'badstart' )
if not verify_time( $start );
!
$w->( $p, "Invalid stop-time '$stop'", 'badstop' )
if $stop ne "" and not verify_time( $stop );
***************
*** 247,253 ****
if( $xmltv_episode =~ /\S/ ) {
$w->($p, "Invalid episode-number '$xmltv_episode'", 'badepisode' )
! if $xmltv_episode !~ /^\s*\d* (\s* \/ \s*\d+)? \s* \.
! \s*\d* (\s* \/ \s*\d+)? \s* \.
! \s*\d* (\s* \/ \s*\d+)? \s* $/x;
}
}
--- 247,253 ----
if( $xmltv_episode =~ /\S/ ) {
$w->($p, "Invalid episode-number '$xmltv_episode'", 'badepisode' )
! if $xmltv_episode !~ /^\s*\d* (\s* \/ \s*\d+)? \s* \.
! \s*\d* (\s* \/ \s*\d+)? \s* \.
! \s*\d* (\s* \/ \s*\d+)? \s* $/x;
}
}
***************
*** 255,263 ****
foreach my $channel (keys %channels) {
if ($channels{$channel} == 0) {
! w( "No programme entries found for $channel",
'channelnoprogramme' );
}
}
!
return (keys %errors);
}
--- 255,263 ----
foreach my $channel (keys %channels) {
if ($channels{$channel} == 0) {
! w( "No programme entries found for $channel",
'channelnoprogramme' );
}
}
!
return (keys %errors);
}
***************
*** 288,292 ****
}
}
!
return 1;
}
--- 288,292 ----
}
}
!
return 1;
}
***************
*** 463,471 ****
$errors{$id}++ if defined $id;
}
!
1;
! =back
=head1 BUGS
--- 463,471 ----
$errors{$id}++ if defined $id;
}
!
1;
! =back
=head1 BUGS
***************
*** 473,477 ****
It is currently necessary to specify the path to the xmltv dtd-file.
This should not be necessary.
!
=head1 COPYRIGHT
--- 473,477 ----
It is currently necessary to specify the path to the xmltv dtd-file.
This should not be necessary.
!
=head1 COPYRIGHT
Index: exe_opt.pl
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/exe_opt.pl,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -d -r1.29 -r1.30
*** exe_opt.pl 31 Oct 2014 04:23:38 -0000 1.29
--- exe_opt.pl 12 Jul 2015 00:59:01 -0000 1.30
***************
*** 60,64 ****
}
}
!
#
# put date in file version field
--- 60,64 ----
}
}
!
#
# put date in file version field
Index: Configure.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Configure.pm,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** Configure.pm 25 May 2014 10:44:52 -0000 1.9
--- Configure.pm 12 Jul 2015 00:59:01 -0000 1.10
***************
*** 10,14 ****
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
--- 10,14 ----
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
***************
*** 60,64 ****
result of a selectmany with id=channel.
! The configuration file must be in the format described in
the file "ConfigurationFiles.txt". If the file does not
exist or if the format is wrong, LoadConfig returns undef.
--- 60,64 ----
result of a selectmany with id=channel.
! The configuration file must be in the format described in
the file "ConfigurationFiles.txt". If the file does not
exist or if the format is wrong, LoadConfig returns undef.
***************
*** 69,77 ****
{
my( $config_file ) = @_;
!
my $data = {};
!
open IN, "< $config_file" or return undef;
!
foreach my $line (<IN>)
{
--- 69,77 ----
{
my( $config_file ) = @_;
!
my $data = {};
!
open IN, "< $config_file" or return undef;
!
foreach my $line (<IN>)
{
***************
*** 79,84 ****
next if $line =~ /^\s*$/;
next if $line =~ /^\s*#/;
!
! # Only accept lines with key=value or key!value.
# No white-space is allowed before
# the equal-sign. White-space after the equal-sign is considered
--- 79,84 ----
next if $line =~ /^\s*$/;
next if $line =~ /^\s*#/;
!
! # Only accept lines with key=value or key!value.
# No white-space is allowed before
# the equal-sign. White-space after the equal-sign is considered
***************
*** 97,101 ****
}
}
!
close IN;
return $data;
--- 97,101 ----
}
}
!
close IN;
return $data;
***************
*** 116,125 ****
{
my( $conf, $config_file ) = @_;
!
# Test if configuration file is writeable
if (-f $config_file && !(-w $config_file)) { die "Cannot write to $config_file"; }
!
# Create temporary configuration file.
! open OUT, "> $config_file.TMP"
or die "Failed to open $config_file.TMP for writing.";
--- 116,125 ----
{
my( $conf, $config_file ) = @_;
!
# Test if configuration file is writeable
if (-f $config_file && !(-w $config_file)) { die "Cannot write to $config_file"; }
!
# Create temporary configuration file.
! open OUT, "> $config_file.TMP"
or die "Failed to open $config_file.TMP for writing.";
***************
*** 146,157 ****
close OUT;
!
# Store temporary configuration file
! rename "$config_file.TMP", $config_file or die "Failed to write to $config_file";
}
=item Configure
! Generates a configuration file for the grabber.
Takes three parameters: stagesub, listsub and the name of the configuration
--- 146,157 ----
close OUT;
!
# Store temporary configuration file
! rename "$config_file.TMP", $config_file or die "Failed to write to $config_file";
}
=item Configure
! Generates a configuration file for the grabber.
Takes three parameters: stagesub, listsub and the name of the configuration
***************
*** 159,164 ****
stagesub shall be a coderef that takes a stage-name or undef
! and a configuration hashref as a parameter and returns an
! xml-string that describes the configuration necessary for that stage.
The xml-string shall follow the xmltv-configuration.dtd.
--- 159,164 ----
stagesub shall be a coderef that takes a stage-name or undef
! and a configuration hashref as a parameter and returns an
! xml-string that describes the configuration necessary for that stage.
The xml-string shall follow the xmltv-configuration.dtd.
***************
*** 175,191 ****
{
my( $stagesub, $listsub, $conffile, $opt ) = @_;
!
# How can we read the language from the environment?
! my $lang = 'en';
!
my $nextstage = 'start';
!
# Test if configuration file is writeable
if (-f $conffile && !(-w $conffile)) { die "Cannot write to $conffile"; }
!
# Create temporary configuration file.
open OUT, "> $conffile.TMP" or die "Failed to write to $conffile.TMP";
close OUT;
!
do
{
--- 175,191 ----
{
my( $stagesub, $listsub, $conffile, $opt ) = @_;
!
# How can we read the language from the environment?
! my $lang = 'en';
!
my $nextstage = 'start';
!
# Test if configuration file is writeable
if (-f $conffile && !(-w $conffile)) { die "Cannot write to $conffile"; }
!
# Create temporary configuration file.
open OUT, "> $conffile.TMP" or die "Failed to write to $conffile.TMP";
close OUT;
!
do
{
***************
*** 202,206 ****
select_channels( $channels, $conffile, $lang );
}
!
# Store temporary configuration file
rename "$conffile.TMP", $conffile or die "Failed to write to $conffile";
--- 202,206 ----
select_channels( $channels, $conffile, $lang );
}
!
# Store temporary configuration file
rename "$conffile.TMP", $conffile or die "Failed to write to $conffile";
***************
*** 213,226 ****
my $nextstage = undef;
! open OUT, ">> $conffile.TMP"
or die "Failed to open $conffile.TMP for writing";
my $xml = XML::LibXML->new;
my $doc = $xml->parse_string($stage);
!
binmode(STDERR, ":utf8") if ($doc->encoding eq "utf-8");
my $ns = $doc->find( "//xmltvconfiguration/*" );
!
foreach my $p ($ns->get_nodelist)
{
--- 213,226 ----
my $nextstage = undef;
! open OUT, ">> $conffile.TMP"
or die "Failed to open $conffile.TMP for writing";
my $xml = XML::LibXML->new;
my $doc = $xml->parse_string($stage);
!
binmode(STDERR, ":utf8") if ($doc->encoding eq "utf-8");
my $ns = $doc->find( "//xmltvconfiguration/*" );
!
foreach my $p ($ns->get_nodelist)
{
***************
*** 237,241 ****
my $default = $p->findvalue( '@default' );
my $constant = $p->findvalue( '@constant' );
!
my $value;
--- 237,241 ----
my $default = $p->findvalue( '@default' );
my $constant = $p->findvalue( '@constant' );
!
my $value;
***************
*** 272,277 ****
if( $tag eq "selectone" )
! {
! my $selected = ask_choice( "$title:", $optiontexts[0],
@optiontexts );
for( my $i=0; $i<scalar( @optiontexts ); $i++ )
--- 272,277 ----
if( $tag eq "selectone" )
! {
! my $selected = ask_choice( "$title:", $optiontexts[0],
@optiontexts );
for( my $i=0; $i<scalar( @optiontexts ); $i++ )
***************
*** 310,314 ****
my( $channels, $conffile, $lang ) = @_;
! open OUT, ">> $conffile.TMP"
or die "Failed to open $conffile.TMP for writing";
--- 310,314 ----
my( $channels, $conffile, $lang ) = @_;
! open OUT, ">> $conffile.TMP"
or die "Failed to open $conffile.TMP for writing";
***************
*** 316,322 ****
my $doc;
$doc = $xml->parse_string($channels);
!
my $ns = $doc->find( "//channel" );
!
my @channelname;
my @channelid;
--- 316,322 ----
my $doc;
$doc = $xml->parse_string($channels);
!
my $ns = $doc->find( "//channel" );
!
my @channelname;
my @channelid;
***************
*** 356,360 ****
$doc = $xml->parse_string($channels);
my $encoding = $doc->encoding;
!
my $ns = $doc->find( "//channel" );
--- 356,360 ----
$doc = $xml->parse_string($channels);
my $encoding = $doc->encoding;
!
my $ns = $doc->find( "//channel" );
***************
*** 364,370 ****
$writer->start( { grabber => $grabber_name } );
$writer->start_selectmany( {
! id => 'channel',
title => [ [ 'Channels', 'en' ] ],
! description => [
[ "Select the channels that you want to receive data for.",
'en' ] ],
--- 364,370 ----
$writer->start( { grabber => $grabber_name } );
$writer->start_selectmany( {
! id => 'channel',
title => [ [ 'Channels', 'en' ] ],
! description => [
[ "Select the channels that you want to receive data for.",
'en' ] ],
***************
*** 373,378 ****
foreach my $p ($ns->get_nodelist)
{
! # FIXME: Preserve all languages for the display-name
! $writer->write_option( {
value=>$p->findvalue( '@id' ),
text=> => [ [ getvalue($p, "display-name", 'en' ),
--- 373,378 ----
foreach my $p ($ns->get_nodelist)
{
! # FIXME: Preserve all languages for the display-name
! $writer->write_option( {
value=>$p->findvalue( '@id' ),
text=> => [ [ getvalue($p, "display-name", 'en' ),
***************
*** 382,386 ****
$writer->end_selectmany();
$writer->end( 'end' );
!
return $result;
}
--- 382,386 ----
$writer->end_selectmany();
$writer->end( 'end' );
!
return $result;
}
***************
*** 392,396 ****
# Try the correct language first
my $value = $p->findvalue( $field . "[\@lang='$lang']");
!
# Use English if there is no value for the correct language.
$value = $p->findvalue( $field . "[\@lang='en']")
--- 392,396 ----
# Try the correct language first
my $value = $p->findvalue( $field . "[\@lang='$lang']");
!
# Use English if there is no value for the correct language.
$value = $p->findvalue( $field . "[\@lang='en']")
***************
*** 409,413 ****
=back
!
=head1 COPYRIGHT
--- 409,413 ----
=back
!
=head1 COPYRIGHT
Index: Date.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Date.pm,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -d -r1.6 -r1.7
*** Date.pm 22 May 2014 08:05:14 -0000 1.6
--- Date.pm 12 Jul 2015 00:59:01 -0000 1.7
***************
*** 89,93 ****
return $parsed;
}
!
my $best_distance;
my $best;
--- 89,93 ----
return $parsed;
}
!
my $best_distance;
my $best;
***************
*** 134,138 ****
=head1 C<time_iso_to_xmltv()>
! Converts an ISO time e.g. "2014-04-12T09:00:00.000+03:00"
to XMLTV format, i.e. "20140412090000 +0300"
--- 134,138 ----
=head1 C<time_iso_to_xmltv()>
! Converts an ISO time e.g. "2014-04-12T09:00:00.000+03:00"
to XMLTV format, i.e. "20140412090000 +0300"
***************
*** 168,178 ****
my $time = shift;
my $ignoreoffset = shift; # set to 1 to ignore tz offset (i.e. 'local' epoch; else will get utc)
!
! my ($y, $m, $d, $h, $i, $s, $t, $th, $tm) = $time =~
m/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\s([\+-])(\d{2})(\d{2})$/;
$y -= 1900; $m -= 1; # re-base for mktime()
use POSIX qw(mktime);
my $epoch = POSIX::mktime($s, $i, $h, $d, $m, $y);
!
if (!defined $ignoreoffset || !$ignoreoffset) {
# note this isn't exact since it doesn't account for leap seconds, etc
--- 168,178 ----
my $time = shift;
my $ignoreoffset = shift; # set to 1 to ignore tz offset (i.e. 'local' epoch; else will get utc)
!
! my ($y, $m, $d, $h, $i, $s, $t, $th, $tm) = $time =~
m/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\s([\+-])(\d{2})(\d{2})$/;
$y -= 1900; $m -= 1; # re-base for mktime()
use POSIX qw(mktime);
my $epoch = POSIX::mktime($s, $i, $h, $d, $m, $y);
!
if (!defined $ignoreoffset || !$ignoreoffset) {
# note this isn't exact since it doesn't account for leap seconds, etc
***************
*** 182,186 ****
}
return $epoch;
!
}
--- 182,186 ----
}
return $epoch;
!
}
***************
*** 204,208 ****
my $time = shift;
my $ignoreoffset = shift; # set to 1 to ignore tz offset (i.e. 'local' epoch; else will get utc)
!
my ($y, $m, $d, $h, $i, $s, $ms, $t, $th, $tm) = $time =~
m/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})([\+-])(\d{2}):(\d{2})$/;
--- 204,208 ----
my $time = shift;
my $ignoreoffset = shift; # set to 1 to ignore tz offset (i.e. 'local' epoch; else will get utc)
!
my ($y, $m, $d, $h, $i, $s, $ms, $t, $th, $tm) = $time =~
m/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})\.(\d{3})([\+-])(\d{2}):(\d{2})$/;
***************
*** 210,214 ****
use POSIX qw(mktime);
my $epoch = POSIX::mktime($s, $i, $h, $d, $m, $y);
!
if (!defined $ignoreoffset || !$ignoreoffset) {
# note this isn't exact since it doesn't account for leap seconds, etc
--- 210,214 ----
use POSIX qw(mktime);
my $epoch = POSIX::mktime($s, $i, $h, $d, $m, $y);
!
if (!defined $ignoreoffset || !$ignoreoffset) {
# note this isn't exact since it doesn't account for leap seconds, etc
Index: IMDB.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/IMDB.pm,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** IMDB.pm 13 Apr 2015 07:21:16 -0000 1.68
--- IMDB.pm 12 Jul 2015 00:59:01 -0000 1.69
***************
*** 84,93 ****
$self->{numActors}=3 if ( !defined($self->{numActors})); # default is to add top 3 actors
!
$self->{moviedbIndex}="$self->{imdbDir}/moviedb.idx";
$self->{moviedbData}="$self->{imdbDir}/moviedb.dat";
$self->{moviedbInfo}="$self->{imdbDir}/moviedb.info";
$self->{moviedbOffline}="$self->{imdbDir}/moviedb.offline";
!
# default is not to cache lookups
$self->{cacheLookups}=0 if ( !defined($self->{cacheLookups}) );
[...1199 lines suppressed...]
$details.="$name|";
--- 3297,3301 ----
$name=~s/\s\([IVX]+\)\[/\[/o;
$name=~s/\s\([IVX]+\)$//o;
!
if ( $name ne $last ) {
$details.="$name|";
***************
*** 3347,3351 ****
print OFF "one of the prep stages' must have produced corrupt data\n";
print OFF "report the following details to xmltv-devel\@lists.sf.net\n";
!
my $info=XMLTV::IMDB::loadDBInfo($self->{moviedbInfo});
if ( ref $info eq 'SCALAR' ) {
--- 3347,3351 ----
print OFF "one of the prep stages' must have produced corrupt data\n";
print OFF "report the following details to xmltv-devel\@lists.sf.net\n";
!
my $info=XMLTV::IMDB::loadDBInfo($self->{moviedbInfo});
if ( ref $info eq 'SCALAR' ) {
Index: set_share_dir.pl
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/set_share_dir.pl,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** set_share_dir.pl 3 Jan 2004 14:52:53 -0000 1.5
--- set_share_dir.pl 12 Jul 2015 00:59:01 -0000 1.6
***************
*** 20,27 ****
# Perl
s/^my \$SHARE_DIR =.*/my \$SHARE_DIR='$share_dir'; \# by $0/ && $seen++;
!
# Python
s/^SHARE_DIR\s*=\s*None$/SHARE_DIR='$share_dir' \# by $0/ && $seen++;
!
print $out_fh $_;
}
--- 20,27 ----
# Perl
s/^my \$SHARE_DIR =.*/my \$SHARE_DIR='$share_dir'; \# by $0/ && $seen++;
!
# Python
s/^SHARE_DIR\s*=\s*None$/SHARE_DIR='$share_dir' \# by $0/ && $seen++;
!
print $out_fh $_;
}
Index: Options.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Options.pm,v
retrieving revision 1.28
retrieving revision 1.29
diff -C2 -d -r1.28 -r1.29
*** Options.pm 30 Jan 2014 14:41:09 -0000 1.28
--- Options.pm 12 Jul 2015 00:59:01 -0000 1.29
***************
*** 175,179 ****
=item --description
! =item --preferredmethod
Handled automatically if the preferredmethod capability has been set and
--- 175,179 ----
=item --description
! =item --preferredmethod
Handled automatically if the preferredmethod capability has been set and
***************
*** 289,295 ****
=item list_lineups_sub
! Optional. A coderef that takes an option hash as returned by ParseOptions
! as a parameter, and returns an xml-string containing a list of all the
! channel lineups for which the grabber can deliver data.
The xml-string shall follow the xmltv-lineups.xsd schema.
--- 289,295 ----
=item list_lineups_sub
! Optional. A coderef that takes an option hash as returned by ParseOptions
! as a parameter, and returns an xml-string containing a list of all the
! channel lineups for which the grabber can deliver data.
The xml-string shall follow the xmltv-lineups.xsd schema.
***************
*** 301,305 ****
=item preferredmethod
! Optional. A value to return when the grabber is called with the
--preferredmethod parameter. Example:
--- 301,305 ----
=item preferredmethod
! Optional. A value to return when the grabber is called with the
--preferredmethod parameter. Example:
***************
*** 342,346 ****
my $capabilities = {};
! foreach my $cap (keys %{cap_options})
{
$capabilities->{$cap} = 0;
--- 342,346 ----
my $capabilities = {};
! foreach my $cap (keys %{cap_options})
{
$capabilities->{$cap} = 0;
***************
*** 371,375 ****
croak "Unknown capability $cap (known: @known)";
}
!
push( @optdef, @{$cap_options{$cap}} );
hash_push( $opt, $cap_defaults{$cap} );
--- 371,375 ----
croak "Unknown capability $cap (known: @known)";
}
!
push( @optdef, @{$cap_options{$cap}} );
hash_push( $opt, $cap_defaults{$cap} );
***************
*** 377,381 ****
}
! if( $capabilities->{preferredmethod}
and not exists($p->{preferredmethod}) )
{
--- 377,381 ----
}
! if( $capabilities->{preferredmethod}
and not exists($p->{preferredmethod}) )
{
***************
*** 383,387 ****
}
! if( exists($p->{preferredmethod})
and not $capabilities->{preferredmethod} )
{
--- 383,387 ----
}
! if( exists($p->{preferredmethod})
and not $capabilities->{preferredmethod} )
{
***************
*** 445,449 ****
Pod::Text->new (sentence => 0, margin => 2, width => 78)->parse_from_file($0);
}
! else
{
require Pod::Usage; import Pod::Usage; pod2usage(-verbose => 2);
--- 445,449 ----
Pod::Text->new (sentence => 0, margin => 2, width => 78)->parse_from_file($0);
}
! else
{
require Pod::Usage; import Pod::Usage; pod2usage(-verbose => 2);
***************
*** 462,466 ****
exit 1;
}
!
# Redirect default output to STDOUT
select( STDOUT );
--- 462,466 ----
exit 1;
}
!
# Redirect default output to STDOUT
select( STDOUT );
***************
*** 494,498 ****
exit 1;
}
!
if( $opt->{stage} eq 'select-channels' )
{
--- 494,498 ----
exit 1;
}
!
if( $opt->{stage} eq 'select-channels' )
{
***************
*** 516,522 ****
exit 1;
}
!
print &{$p->{listchannels_sub}}($conf,$opt);
!
exit 0;
}
--- 516,522 ----
exit 1;
}
!
print &{$p->{listchannels_sub}}($conf,$opt);
!
exit 0;
}
***************
*** 540,544 ****
exit 1;
}
!
return ($opt, $conf);
}
--- 540,544 ----
exit 1;
}
!
return ($opt, $conf);
}
***************
*** 555,559 ****
$gn --info
!
$gn --version
--- 555,559 ----
$gn --info
!
$gn --version
Index: ProgressBar.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/ProgressBar.pm,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ProgressBar.pm 7 Sep 2004 18:41:41 -0000 1.1
--- ProgressBar.pm 12 Jul 2015 00:59:01 -0000 1.2
***************
*** 5,9 ****
package XMLTV::ProgressBar;
! use strict;
use XMLTV::GUI;
--- 5,9 ----
package XMLTV::ProgressBar;
! use strict;
use XMLTV::GUI;
***************
*** 27,34 ****
sub init( $ ) {
my $opt_gui = shift;
!
! # Ask the XMLTV::GUI module for the graphics type we will use
my $gui_type = XMLTV::GUI::get_gui_type($opt_gui);
!
if ($gui_type eq 'term') {
$real_class = 'XMLTV::ProgressBar::None';
--- 27,34 ----
sub init( $ ) {
my $opt_gui = shift;
!
! # Ask the XMLTV::GUI module for the graphics type we will use
my $gui_type = XMLTV::GUI::get_gui_type($opt_gui);
!
if ($gui_type eq 'term') {
$real_class = 'XMLTV::ProgressBar::None';
***************
*** 50,61 ****
sub new {
my $class = shift;
!
((my $real_class_path = $real_class.".pm") =~ s/::/\//g);
!
require $real_class_path;
import $real_class_path;
!
$bar = $real_class->new(@_);
!
my $self = {};
return bless $self, $class;
--- 50,61 ----
sub new {
my $class = shift;
!
((my $real_class_path = $real_class.".pm") =~ s/::/\//g);
!
require $real_class_path;
import $real_class_path;
!
$bar = $real_class->new(@_);
!
my $self = {};
return bless $self, $class;
***************
*** 76,80 ****
# Only does anything for the GUI ones.
if ($real_class eq 'XMLTV::ProgressBar::Tk') {
! return $bar->finish();
}
}
--- 76,80 ----
# Only does anything for the GUI ones.
if ($real_class eq 'XMLTV::ProgressBar::Tk') {
! return $bar->finish();
}
}
Index: ValidateGrabber.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/ValidateGrabber.pm,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** ValidateGrabber.pm 20 Oct 2013 17:04:37 -0000 1.18
--- ValidateGrabber.pm 12 Jul 2015 00:59:01 -0000 1.19
***************
*** 6,10 ****
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
--- 6,10 ----
use Exporter ();
our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);
!
@ISA = qw(Exporter);
@EXPORT = qw( );
***************
*** 64,68 ****
return 1;
}
!
return 1;
}
--- 64,68 ----
return 1;
}
!
return 1;
}
***************
*** 72,76 ****
Run the validation for a grabber.
! ValidateGrabber( "tv_grab_new", "./tv_grab_new", "./tv_grab_new.conf",
"/tmp/new_", "./blib/share", 0 )
--- 72,76 ----
Run the validation for a grabber.
! ValidateGrabber( "tv_grab_new", "./tv_grab_new", "./tv_grab_new.conf",
"/tmp/new_", "./blib/share", 0 )
***************
*** 110,114 ****
ValidateGrabber returns a list of errors that it found with the grabber. Each
! error takes the form of a keyword:
=over
--- 110,114 ----
ValidateGrabber returns a list of errors that it found with the grabber. Each
! error takes the form of a keyword:
=over
***************
*** 145,152 ****
The grabber returned with an error-code when asked to grab data.
!
=item notquiet
! The grabber printed something to STDERR even though the --quiet option
was used.
--- 145,152 ----
The grabber returned with an error-code when asked to grab data.
!
=item notquiet
! The grabber printed something to STDERR even though the --quiet option
was used.
***************
*** 174,180 ****
=back
! Additionally, the list of errors will contain error keywords from
XMLTV::ValidateFile if the xmltv-file generated by the grabber was not
! valid.
If no errors are found, an empty list is returned.
--- 174,180 ----
=back
! Additionally, the list of errors will contain error keywords from
XMLTV::ValidateFile if the xmltv-file generated by the grabber was not
! valid.
If no errors are found, an empty list is returned.
***************
*** 237,241 ****
my $extraop = "";
! $extraop .= "--cache ${op}cache "
if $capability{cache} and $usecache;
$extraop .= "--share $sharedir "
--- 237,241 ----
my $extraop = "";
! $extraop .= "--cache ${op}cache "
if $capability{cache} and $usecache;
$extraop .= "--share $sharedir "
***************
*** 254,258 ****
my $output = "${op}1_2";
!
if (run "$cmd > $output.xml --quiet 2>${op}1.log") {
w "$shortname failed: See ${op}1.log";
--- 254,258 ----
my $output = "${op}1_2";
!
if (run "$cmd > $output.xml --quiet 2>${op}1.log") {
w "$shortname failed: See ${op}1.log";
***************
*** 279,283 ****
}
w "$output.xml validates ok";
!
# Run through tv_cat, which makes sure the data looks like XMLTV.
# What kind of errors does this catch that ValidateFile misses?
--- 279,283 ----
}
w "$output.xml validates ok";
!
# Run through tv_cat, which makes sure the data looks like XMLTV.
# What kind of errors does this catch that ValidateFile misses?
***************
*** 287,291 ****
goto bailout;
}
!
# Do tv_sort sanity checks. One day it would be better to put
# this stuff in a Perl library.
--- 287,291 ----
goto bailout;
}
!
# Do tv_sort sanity checks. One day it would be better to put
# this stuff in a Perl library.
***************
*** 297,301 ****
push @errors, "sorterror";
}
!
}
--- 297,301 ----
push @errors, "sorterror";
}
!
}
***************
*** 305,314 ****
my $cmd2 = "$exe --config-file $conf --offset 1 --days 1 $extraop"
. " --output $output2 2>${op}2.log";
!
if (run $cmd2) {
w "$shortname with --output failed: See ${op}2.log";
push @errors, "graberror";
}
!
my $output3 = "${op}2_1.xml";
my $cmd3 = "$exe --config-file $conf --offset 2 --days 1 $extraop"
--- 305,314 ----
my $cmd2 = "$exe --config-file $conf --offset 1 --days 1 $extraop"
. " --output $output2 2>${op}2.log";
!
if (run $cmd2) {
w "$shortname with --output failed: See ${op}2.log";
push @errors, "graberror";
}
!
my $output3 = "${op}2_1.xml";
my $cmd3 = "$exe --config-file $conf --offset 2 --days 1 $extraop"
***************
*** 322,326 ****
unlink( "${op}3.log" );
}
!
my $output4 = "${op}4.xml";
my $cmd4 = "$cmd --quiet --output $output4 2>${op}4.log";
--- 322,326 ----
unlink( "${op}3.log" );
}
!
my $output4 = "${op}4.xml";
my $cmd4 = "$cmd --quiet --output $output4 2>${op}4.log";
***************
*** 340,350 ****
}
}
!
if (not cat_files( $output2, $output3, "${op}1_2-2.xml", "${op}5.log" )) {
w "tv_cat failed to concatenate the data. See ${op}5.log";
push @errors, "caterror";
}
!
! if (not sort_file( "${op}1_2-2.xml", "${op}1_2-2.sorted.xml",
"${op}7.log" )) {
w "tv_sort failed on the concatenated data. Probably due " .
--- 340,350 ----
}
}
!
if (not cat_files( $output2, $output3, "${op}1_2-2.xml", "${op}5.log" )) {
w "tv_cat failed to concatenate the data. See ${op}5.log";
push @errors, "caterror";
}
!
! if (not sort_file( "${op}1_2-2.xml", "${op}1_2-2.sorted.xml",
"${op}7.log" )) {
w "tv_sort failed on the concatenated data. Probably due " .
***************
*** 352,356 ****
push @errors, "notadditive";
}
!
if( !compare_files( "$output.sorted.xml", "${op}1_2-2.sorted.xml",
"${op}_1_2.diff" ) ) {
--- 352,356 ----
push @errors, "notadditive";
}
!
if( !compare_files( "$output.sorted.xml", "${op}1_2-2.sorted.xml",
"${op}_1_2.diff" ) ) {
***************
*** 358,362 ****
push @errors, "notadditive";
}
!
bailout:
close( $runfh );
--- 358,362 ----
push @errors, "notadditive";
}
!
bailout:
close( $runfh );
***************
*** 372,376 ****
if (scalar( @ferrors )) {
! w "$shortname did not validate ok. See ${op}commands.log for a "
. "list of the commands that were used";
}
--- 372,376 ----
if (scalar( @ferrors )) {
! w "$shortname did not validate ok. See ${op}commands.log for a "
. "list of the commands that were used";
}
***************
*** 408,412 ****
alarm 0;
};
! $SIG{HUP} = 'DEFAULT';
if ($killed) {
--- 408,412 ----
alarm 0;
};
! $SIG{HUP} = 'DEFAULT';
if ($killed) {
***************
*** 427,431 ****
}
! # Run an external command and return the output. Exit if the command is
# interrupted with ctrl-c.
sub run_capture {
--- 427,431 ----
}
! # Run an external command and return the output. Exit if the command is
# interrupted with ctrl-c.
sub run_capture {
***************
*** 450,454 ****
alarm 0;
};
! $SIG{HUP} = 'DEFAULT';
if ($killed) {
--- 450,454 ----
alarm 0;
};
! $SIG{HUP} = 'DEFAULT';
if ($killed) {
***************
*** 488,492 ****
my $ret = run( "tv_cat $file1 > $outfile 2>$logfile" );
!
return $ret ? 0 : 1;
}
--- 488,492 ----
my $ret = run( "tv_cat $file1 > $outfile 2>$logfile" );
!
return $ret ? 0 : 1;
}
***************
*** 497,501 ****
my $ret = run( "tv_cat $file1 $file2 > $outfile 2>$logfile" );
!
return $ret ? 0 : 1;
}
--- 497,501 ----
my $ret = run( "tv_cat $file1 $file2 > $outfile 2>$logfile" );
!
return $ret ? 0 : 1;
}
***************
*** 506,519 ****
my $ret = run( "tv_sort --duplicate-error $file1 > $outfile 2>$logfile" );
!
return 0 if -s $logfile > 0;
return $ret ? 0 : 1;
}
!
1;
! =back
!
=head1 COPYRIGHT
--- 506,519 ----
my $ret = run( "tv_sort --duplicate-error $file1 > $outfile 2>$logfile" );
!
return 0 if -s $logfile > 0;
return $ret ? 0 : 1;
}
!
1;
! =back
!
=head1 COPYRIGHT
Index: XMLTV.pm.in
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/XMLTV.pm.in,v
retrieving revision 1.169
retrieving revision 1.170
diff -C2 -d -r1.169 -r1.170
*** XMLTV.pm.in 5 Jul 2015 04:32:22 -0000 1.169
--- XMLTV.pm.in 12 Jul 2015 00:59:01 -0000 1.170
***************
*** 38,42 ****
# - best I can think of for the minute is a global (yuk)
my $DIE_ON_MULTIPLE_ENCODINGS = 1;
!
my %warned_unknown_key;
sub warn_unknown_keys( $$ );
--- 38,42 ----
# - best I can think of for the minute is a global (yuk)
my $DIE_ON_MULTIPLE_ENCODINGS = 1;
!
my %warned_unknown_key;
sub warn_unknown_keys( $$ );
***************
*** 446,450 ****
}
},
!
'/tv/programme' => sub {
my ($t, $node) = @_;
--- 446,450 ----
}
},
!
'/tv/programme' => sub {
my ($t, $node) = @_;
***************
*** 507,511 ****
my $do_next_file; # sub to parse file ( defined below)
my $do_file_number; # current file in @files array
!
my $my_enc_cb = sub( $ ) {
my $e = shift;
--- 507,511 ----
my $do_next_file; # sub to parse file ( defined below)
my $do_file_number; # current file in @files array
!
my $my_enc_cb = sub( $ ) {
my $e = shift;
***************
*** 577,583 ****
my $my_p_cb = sub( $ ) {
my $doing_file = $do_file_number;
!
$do_next_file->(); # if any
!
$do_file_number = $doing_file;
$p_cb->(@_, $do_file_number) if $p_cb;
--- 577,583 ----
my $my_p_cb = sub( $ ) {
my $doing_file = $do_file_number;
!
$do_next_file->(); # if any
!
$do_file_number = $doing_file;
$p_cb->(@_, $do_file_number) if $p_cb;
***************
*** 760,764 ****
#
sub get_name( $ ) { $_[0]->gi() }
!
# Private.
#
--- 760,764 ----
#
sub get_name( $ ) { $_[0]->gi() }
!
# Private.
#
***************
*** 951,956 ****
The first argument is a hash reference giving information to pass to
C<XMLTV::Writer>E<39>s constructor. But do not specify encoding, this
! will be taken from the input files. C<catfiles()> will abort if the
! input files have different encodings, unless the 'UTF8'=1 argument
is passed in.
--- 951,956 ----
The first argument is a hash reference giving information to pass to
C<XMLTV::Writer>E<39>s constructor. But do not specify encoding, this
! will be taken from the input files. C<catfiles()> will abort if the
! input files have different encodings, unless the 'UTF8'=1 argument
is passed in.
***************
*** 964,975 ****
my %seen_ch;
my %seen_progs;
!
$DIE_ON_MULTIPLE_ENCODINGS = ( defined $w_args->{UTF8} ? 0 : 1 );
$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
!
XMLTV::parsefiles_callback
(sub {
$enc = shift;
! my $do_file = shift;
$encs[$do_file] = (defined $enc ? $enc : 'unknown');
t "file $do_file = $enc" if defined $enc;
--- 964,975 ----
my %seen_ch;
my %seen_progs;
!
$DIE_ON_MULTIPLE_ENCODINGS = ( defined $w_args->{UTF8} ? 0 : 1 );
$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
!
XMLTV::parsefiles_callback
(sub {
$enc = shift;
! my $do_file = shift;
$encs[$do_file] = (defined $enc ? $enc : 'unknown');
t "file $do_file = $enc" if defined $enc;
***************
*** 981,987 ****
my $id = $c->{id};
if (not defined $seen_ch{$id}) {
!
my $do_file = shift;
! if (defined $w_args->{UTF8}) {
if (uc($encs[$do_file]) ne 'UTF-8' && $encs[$do_file] ne 'unknown') {
# recode the incoming channel name
--- 981,987 ----
my $id = $c->{id};
if (not defined $seen_ch{$id}) {
!
my $do_file = shift;
! if (defined $w_args->{UTF8}) {
if (uc($encs[$do_file]) ne 'UTF-8' && $encs[$do_file] ne 'unknown') {
# recode the incoming channel name
***************
*** 991,995 ****
}
}
!
$w->write_channel($c);
$seen_ch{$id} = $c;
--- 991,995 ----
}
}
!
$w->write_channel($c);
$seen_ch{$id} = $c;
***************
*** 1003,1007 ****
}
},
! sub {
my $p = shift;
my $do_file = shift;
--- 1003,1007 ----
}
},
! sub {
my $p = shift;
my $do_file = shift;
***************
*** 1062,1066 ****
my @all_progs;
my $do_progs = shift;
!
$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
--- 1062,1066 ----
my @all_progs;
my $do_progs = shift;
!
$Data::Dumper::Sortkeys = 1; # ensure consistent order of dumped hash
***************
*** 1097,1101 ****
}
}
!
# Now in uniqueness checks ignore the date.
if (not defined $all_credits_nodate) {
--- 1097,1101 ----
}
}
!
# Now in uniqueness checks ignore the date.
if (not defined $all_credits_nodate) {
***************
*** 1232,1236 ****
#
$w->startTag($e) if $w;
! foreach ( qw[director actor writer adapter producer composer
editor presenter commentator guest] ) {
next unless defined $h{$_};
--- 1232,1236 ----
#
$w->startTag($e) if $w;
! foreach ( qw[director actor writer adapter producer composer
editor presenter commentator guest] ) {
next unless defined $h{$_};
***************
*** 1246,1250 ****
} else {
$w->dataElement($_, $person) if $w;
! }
}
}
--- 1246,1250 ----
} else {
$w->dataElement($_, $person) if $w;
! }
}
}
***************
*** 1613,1617 ****
# Remaining children are icons.
my @icons = map { read_icon($_) } @children;
!
return [ $rating, $system, \@icons ];
};
--- 1613,1617 ----
# Remaining children are icons.
my @icons = map { read_icon($_) } @children;
!
return [ $rating, $system, \@icons ];
};
***************
*** 1669,1673 ****
# Remaining children are icons.
my @icons = map { read_icon($_) } @children;
!
return [ $rating, $system, \@icons ];
};
--- 1669,1673 ----
# Remaining children are icons.
my @icons = map { read_icon($_) } @children;
!
return [ $rating, $system, \@icons ];
};
***************
*** 1855,1859 ****
my $old_text = $text;
$text =~ s/^\s+//;
! $text =~ s/\s+$//;
if (not length $text) {
--- 1855,1859 ----
my $old_text = $text;
$text =~ s/^\s+//;
! $text =~ s/\s+$//;
if (not length $text) {
***************
*** 1982,1986 ****
}
}
!
t '\@Channel_Handlers=' . d \@Channel_Handlers;
call_handlers_read($node, \@Channel_Handlers, \%channel);
--- 1982,1986 ----
}
}
!
t '\@Channel_Handlers=' . d \@Channel_Handlers;
call_handlers_read($node, \@Channel_Handlers, \%channel);
***************
*** 2253,2268 ****
# $Log::TraceMessages::On = 1;
! $self->{mintime} = "19700101000000";
! $self->{maxtime} = "29991231235959";
!
if (defined( $days ) and defined( $offset ) and defined( $cutoff )) {
! $self->{mintime} = UnixDate(
DateCalc( "today", "+" . $offset . " days" ),
"%Y%m%d") . $cutoff;
t "using mintime $self->{mintime}";
! $self->{maxtime} = UnixDate(
! DateCalc("today", "+" . ($offset+$days) . " days"),
"%Y%m%d" ) . $cutoff;
t "using maxtime $self->{maxtime}";
--- 2253,2268 ----
# $Log::TraceMessages::On = 1;
! $self->{mintime} = "19700101000000";
! $self->{maxtime} = "29991231235959";
!
if (defined( $days ) and defined( $offset ) and defined( $cutoff )) {
! $self->{mintime} = UnixDate(
DateCalc( "today", "+" . $offset . " days" ),
"%Y%m%d") . $cutoff;
t "using mintime $self->{mintime}";
! $self->{maxtime} = UnixDate(
! DateCalc("today", "+" . ($offset+$days) . " days"),
"%Y%m%d" ) . $cutoff;
t "using maxtime $self->{maxtime}";
Index: exe_wrap.pl
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/exe_wrap.pl,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** exe_wrap.pl 21 Oct 2014 06:55:31 -0000 1.96
--- exe_wrap.pl 12 Jul 2015 00:59:01 -0000 1.97
***************
*** 86,90 ****
{
my $dir = dirname(PerlApp::exe()); # get full program path
! $dir =~ s!\\!/!g; # use / not \
# die "EXE path contains spaces. This is known to cause problems.\nPlease move xmltv.exe to a different directory\n" if $dir =~ / /;
$dir .= "/share/xmltv";
--- 86,90 ----
{
my $dir = dirname(PerlApp::exe()); # get full program path
! $dir =~ s!\\!/!g; # use / not \
# die "EXE path contains spaces. This is known to cause problems.\nPlease move xmltv.exe to a different directory\n" if $dir =~ / /;
$dir .= "/share/xmltv";
***************
*** 116,120 ****
exit 0;
}
!
#
# scan through attached files and execute program if found
--- 116,120 ----
exit 0;
}
!
#
# scan through attached files and execute program if found
***************
*** 125,129 ****
next unless length($exe)>3; #ignore trash
$_=$exe;
! s!^.+/!!g;
$cmds{$_}=1; # build command list (just in case)
--- 125,129 ----
next unless length($exe)>3; #ignore trash
$_=$exe;
! s!^.+/!!g;
$cmds{$_}=1; # build command list (just in case)
***************
*** 156,160 ****
$rows = int($#cmds / 3)+1;
! map {$_='' unless defined $_} @cmds[0..($rows*3+2)];
unshift @cmds,undef;
--- 156,160 ----
$rows = int($#cmds / 3)+1;
! map {$_='' unless defined $_} @cmds[0..($rows*3+2)];
unshift @cmds,undef;
Index: Summarize.pm
===================================================================
RCS file: /cvsroot/xmltv/xmltv/lib/Summarize.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -d -r1.5 -r1.6
*** Summarize.pm 8 Jun 2015 17:41:14 -0000 1.5
--- Summarize.pm 12 Jul 2015 00:59:01 -0000 1.6
***************
*** 119,123 ****
$start_tz = gettz($_->{start}) || 'UTC';
$start_hhmm = UnixDate($start, '%R');
!
my ($stop, $stop_tz, $stop_hhmm);
if (defined $_->{stop}) {
--- 119,123 ----
$start_tz = gettz($_->{start}) || 'UTC';
$start_hhmm = UnixDate($start, '%R');
!
my ($stop, $stop_tz, $stop_hhmm);
if (defined $_->{stop}) {
***************
*** 141,145 ****
\&shorter)->[0];
}
!
my $desc;
if (defined $_->{'desc'}) {
--- 141,145 ----
\&shorter)->[0];
}
!
my $desc;
if (defined $_->{'desc'}) {
***************
*** 149,153 ****
$desc =~ tr/\t\n/ /; # remove tabs and newlines
}
!
if (not defined $curr_tz) {
# Assume that the first item in a listing doesn't need an
--- 149,153 ----
$desc =~ tr/\t\n/ /; # remove tabs and newlines
}
!
if (not defined $curr_tz) {
# Assume that the first item in a listing doesn't need an
***************
*** 165,169 ****
undef $curr_tz;
}
!
unless (defined $stop_tz and $start_tz ne $stop_tz) {
# The programme probably starts and stops in the same TZ -
--- 165,169 ----
undef $curr_tz;
}
!
unless (defined $stop_tz and $start_tz ne $stop_tz) {
# The programme probably starts and stops in the same TZ -
------------------------------------------------------------------------------
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/