summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-06-10 13:11:41 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-06-10 13:11:41 (GMT)
commit06e03ea970f2111022c1982d5ef3d50e30db10c0 (patch)
tree690d532f28fffc13342bd141d911fffe7ae053b7
parent154058d037063dcac05cefe4b120623e4190b0f0 (diff)
fixe FL importer
-rw-r--r--debian/changelog6
-rwxr-xr-xrhimport-fl23
2 files changed, 18 insertions, 11 deletions
diff --git a/debian/changelog b/debian/changelog
index 6f2becf..b6ddb39 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+rhimport (0.3.15-52) unstable; urgency=medium
+
+ * fixe FL importer
+
+ -- Christian Pointner <equinox@helsinki.at> Fri, 10 Jun 2016 15:11:12 +0200
+
rhimport (0.3.15-51) unstable; urgency=medium
* actually add importer FL
diff --git a/rhimport-fl b/rhimport-fl
index 52fbc3b..f7928ef 100755
--- a/rhimport-fl
+++ b/rhimport-fl
@@ -119,8 +119,8 @@ my $feed = rhimport::fetch_parse_rss($RSS_URL)
or die "Error fetching feed: " . XML::Feed->errstr;
my $shows_left = -1;
-my $file = "";
my $out_file = "";
+my $url = "";
my $this_broadcast = $last_broadcast;
my $i = 0;
for my $entry ($feed->entries) {
@@ -145,7 +145,7 @@ for my $entry ($feed->entries) {
$fetchurl = $1 . $2;
}
- my $url = new URI::URL($fetchurl);
+ $url = new URI::URL($fetchurl);
my @path = $url->path_components;
$out_file = $path[-1];
if(!rhimport::check_file_extension($out_file)) {
@@ -154,21 +154,22 @@ for my $entry ($feed->entries) {
exit 1;
}
- print " --> #" . $idt . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. ";
- $file = "/tmp/" . $out_file;
- system("wget", "--quiet", "--no-check-certificate", $url, "-O", $file);
- if( $! != 0) {
- die "wget returned with error: " . $!;
- }
- print "ok\n";
-
$this_broadcast = $idt;
last;
}
}
}
+print " --> #" . $this_broadcast . ": downloading " . $url . " .. ";
+my $file = "/tmp/" . $out_file;
+system("wget", "--quiet", "--no-check-certificate", $url, "-O", $file);
+if( $! != 0) {
+ die "wget returned with error: " . $!;
+}
+print "ok\n";
+
+
if($file eq "" || !(-e "$file")) {
- print "No Entry for $last_broadcast (there are no new shows available) - ";
+ print "No Entry for $last_broadcast (there are no new shows available) or download error - ";
if($LAST_RUN) {
print "giving up, manual import necessary!!!\n";
} else {