summaryrefslogtreecommitdiff
path: root/rhautoimport-eu
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-06-03 16:32:14 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-06-03 16:32:14 (GMT)
commit942e6fac0ae6ac250e8562d6d3d54fc06fa65621 (patch)
treeca93a81ca5efc880129844c58abdc0806b13540d /rhautoimport-eu
parentd2c6fec75ece949097f6e70abb527d90d6488a85 (diff)
fixed EU importer (already downloaded file...)
Diffstat (limited to 'rhautoimport-eu')
-rwxr-xr-xrhautoimport-eu14
1 files changed, 10 insertions, 4 deletions
diff --git a/rhautoimport-eu b/rhautoimport-eu
index a8a57aa..5aad6f0 100755
--- a/rhautoimport-eu
+++ b/rhautoimport-eu
@@ -27,7 +27,6 @@ use DateTime::Format::ISO8601;
use URI::URL;
use HTML::Entities;
-use lib '../rhrdlibs/lib';
use lib '/usr/local/share/rhautoimport/';
use rhautoimport;
@@ -101,10 +100,7 @@ my $file = "";
my $sum_title = "";
my $sum_text = "";
-my $i = 0;
for my $clip (@clips) {
- $i++;
-
$sum_title = decode_entities($clip->{title});
next unless $sum_title =~ /$titleexp/;
@@ -128,6 +124,16 @@ for my $clip (@clips) {
my @path = $uri->path_components;
$file = $path[-1];
+ my $current_file = `cat $STAT_FILE`;
+ if($current_file eq $file) {
+ print "Already downloaded file of today\n";
+ exit 42;
+ }
+ if(!rhautoimport::check_file_extension($file)) {
+ print "\n\nThe extension of the matching file '". $file . "' seems to be wrong - manual import necessary!!!\n";
+ exit 1;
+ }
+
last
}
if($uri eq "") {