xmltv/grab/sd_json tv_grab_sd_json,1.13,1.14
Kevin Groeneveld <[email protected]> Sat, 02 Jul 2016 23:36:33 +0000
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/sd_json
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv29332
Modified Files:
tv_grab_sd_json
Log Message:
tv_grab_sd_json: Fix missing episode/season/part when all values are 0.
XMLTV uses zero based episode/season/part numbers. The if statement which
tests whether to output these values was testing the variables numerically
instead of checking the string length.
Thanks to Sean Carlos for spotting this bug.
Index: tv_grab_sd_json
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/sd_json/tv_grab_sd_json,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** tv_grab_sd_json 1 Jul 2016 17:08:50 -0000 1.13
--- tv_grab_sd_json 2 Jul 2016 23:36:31 -0000 1.14
***************
*** 1133,1137 ****
sub _get_program_episode {
my ($number, $total) = @_;
! my $result;
if(looks_like_number($number) && int($number)) {
--- 1133,1137 ----
sub _get_program_episode {
my ($number, $total) = @_;
! my $result = '';
if(looks_like_number($number) && int($number)) {
***************
*** 1147,1153 ****
sub get_program_episode {
my ($program, $details) = @_;
! my $season;
! my $episode;
! my $part;
my @result;
--- 1147,1153 ----
sub get_program_episode {
my ($program, $details) = @_;
! my $season = '';
! my $episode = '';
! my $part = '';
my @result;
***************
*** 1164,1171 ****
}
! if($season || $episode || $part) {
! $season //= '';
! $episode //= '';
! $part //= '';
push(@result, [ sprintf('%s.%s.%s', $season, $episode, $part), 'xmltv_ns' ]);
}
--- 1164,1168 ----
}
! if(length($season) || length($episode) || length($part)) {
push(@result, [ sprintf('%s.%s.%s', $season, $episode, $part), 'xmltv_ns' ]);
}
------------------------------------------------------------------------------
Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San
Francisco, CA to explore cutting-edge tech and listen to tech luminaries
present their vision of the future. This family event has something for
everyone, including kids. Get more information and register today.
http://sdm.link/attshape