summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 "") {