xmltv/grab/sd_json tv_grab_sd_json,1.10,1.11
Kevin Groeneveld <[email protected]> Thu, 09 Jun 2016 00:39:07 +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-serv13787/grab/sd_json
Modified Files:
tv_grab_sd_json
Log Message:
tv_grab_sd_json: use DateTime::Format::DateParse instead of ::ISO9601
Index: tv_grab_sd_json
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/sd_json/tv_grab_sd_json,v
retrieving revision 1.10
retrieving revision 1.11
diff -C2 -d -r1.10 -r1.11
*** tv_grab_sd_json 5 Jun 2016 20:14:48 -0000 1.10
--- tv_grab_sd_json 9 Jun 2016 00:39:05 -0000 1.11
***************
*** 59,63 ****
use JSON;
use Digest::SHA qw(sha1_hex);
! use DateTime::Format::ISO8601;
use List::MoreUtils qw(uniq);
use Scalar::Util qw(looks_like_number);
--- 59,63 ----
use JSON;
use Digest::SHA qw(sha1_hex);
! use DateTime::Format::DateParse;
use List::MoreUtils qw(uniq);
use Scalar::Util qw(looks_like_number);
***************
*** 726,730 ****
for my $schedule (values %{$cache_schedules->{$channel}}) {
for my $program (@{$schedule->{'programs'}}) {
! my $dt = DateTime::Format::ISO8601->parse_datetime($program->{'airDateTime'});
my $dur = DateTime::Duration->new(seconds => $program->{'duration'});
--- 726,730 ----
for my $schedule (values %{$cache_schedules->{$channel}}) {
for my $program (@{$schedule->{'programs'}}) {
! my $dt = DateTime::Format::DateParse->parse_datetime($program->{'airDateTime'});
my $dur = DateTime::Duration->new(seconds => $program->{'duration'});
***************
*** 1217,1229 ****
my $date = $details->{'originalAirDate'};
if($date) {
! my $dt = DateTime::Format::ISO8601->parse_datetime($date);
!
! # Older versions of mythtv needs full date and time even though xmltv
! # only requires date. No timezone is specified in the source data so
! # lets assume the local timezone otherwise UTC will be assumed which
! # can cause mythtv to store the wrong date. Whether we actually
! # include the time in the output depends on the selected format in
! # the config file.
! $dt->set_time_zone('local');
$previously_shown{'start'} = $dt->strftime($previously_shown_format);
}
--- 1217,1228 ----
my $date = $details->{'originalAirDate'};
if($date) {
! # SD-JSON only specifies a date for originalAirDate. Older versions of
! # mythtv need full date and time even though xmltv only requires date.
! # DateParse will assume local time as mythtv expects. We set the time
! # to noon to minimize the chance of an error causing the day to be off
! # by one. Whether we actually include the time in the output depends
! # on the selected format in the config file.
! my $dt = DateTime::Format::DateParse->parse_datetime($date);
! $dt->add(hours => 12);
$previously_shown{'start'} = $dt->strftime($previously_shown_format);
}
***************
*** 1311,1315 ****
my ($w, $channel, $program, $details) = @_;
! my $dt = DateTime::Format::ISO8601->parse_datetime($program->{'airDateTime'});
my $dur = DateTime::Duration->new(seconds => $program->{'duration'});
--- 1310,1314 ----
my ($w, $channel, $program, $details) = @_;
! my $dt = DateTime::Format::DateParse->parse_datetime($program->{'airDateTime'});
my $dur = DateTime::Duration->new(seconds => $program->{'duration'});
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e