xmltv/grab/dk_dr tv_grab_dk_dr,1.9,1.10
Geoff <[email protected]>
| Newsgroups | gmane.comp.tv.xmltv.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/xmltv/xmltv/grab/dk_dr
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv4915
Modified Files:
tv_grab_dk_dr
Log Message:
Remove Try::Tiny (not supported on test server)
Fix version string
Fix line endings
Index: tv_grab_dk_dr
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/dk_dr/tv_grab_dk_dr,v
retrieving revision 1.9
retrieving revision 1.10
diff -C2 -d -r1.9 -r1.10
*** tv_grab_dk_dr 4 Jan 2014 10:41:01 -0000 1.9
--- tv_grab_dk_dr 5 Jan 2014 09:05:55 -0000 1.10
***************
*** 51,55 ****
use DateTime;
- use Try::Tiny;
# TODO: This ought be in a config file, I suppose. But for now, it lives here.
--- 51,54 ----
***************
*** 67,71 ****
my $debug = 0; # Plenty of extra output.
! my $grabber_name = 'tv_grab_dk_dr_2012';
my $id_prefix = '.dr.dk';
--- 66,70 ----
my $debug = 0; # Plenty of extra output.
! my $grabber_name = 'tv_grab_dk_dr';
my $id_prefix = '.dr.dk';
***************
*** 257,263 ****
print STDERR "Got: $content\n" if $debug;
my $channels = ();
! try {
$channels = from_json( $content, { utf8 => 1 } );
! } catch {
warn "Failed to get channels: $_";
};
--- 256,263 ----
print STDERR "Got: $content\n" if $debug;
my $channels = ();
! eval {
$channels = from_json( $content, { utf8 => 1 } );
! 1;
! } or do {
warn "Failed to get channels: $_";
};
***************
*** 301,307 ****
my $parsed = ();
! try {
$parsed = from_json( $content, { utf8 => 1 } );
! } catch {
# Ignoring failed json parses.
};
--- 301,308 ----
my $parsed = ();
! eval {
$parsed = from_json( $content, { utf8 => 1 } );
! 1;
! } or do {
# Ignoring failed json parses.
};
***************
*** 397,406 ****
if ($desc_content) {
my $json;
! try {
$json = from_json( $desc_content, { utf8 => 1 } );
$description = $json->{'Description'} . ' ';
$description =~ s/\<br\>/. /g;
$description =~ s/\s*\n\s*/. /g;
! } catch {
# Ignoring failed json parses, leaving desc empty.
};
--- 398,408 ----
if ($desc_content) {
my $json;
! eval {
$json = from_json( $desc_content, { utf8 => 1 } );
$description = $json->{'Description'} . ' ';
$description =~ s/\<br\>/. /g;
$description =~ s/\s*\n\s*/. /g;
! 1;
! } or do {
# Ignoring failed json parses, leaving desc empty.
};
***************
*** 477,481 ****
listchannels_sub => \&list_channels,
#load_old_config_sub => \&load_old_config,
! version => '$Id$grabber_name . ',v 0.0.1 2012-10-30',
description => "TV Oversigten fra Danmarks Radios (2012) ".
"(www.dr.dk/tjenester/programoversigt)",
--- 479,483 ----
listchannels_sub => \&list_channels,
#load_old_config_sub => \&load_old_config,
! version => '$Id$',
description => "TV Oversigten fra Danmarks Radios (2012) ".
"(www.dr.dk/tjenester/programoversigt)",
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk