diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-06-20 18:04:34 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-06-20 18:04:34 (GMT) |
commit | 98a1be65db273fbf949b50909a0700ffda7b71fd (patch) | |
tree | 0e885b255c2becfbfbba8231efd9368843936f30 | |
parent | bad34ad0166f03e753905aae1bbe1cdea2d9c4f8 (diff) |
added extension check to all autoimports
-rwxr-xr-x | rhimport-btl | 5 | ||||
-rwxr-xr-x | rhimport-dn | 5 | ||||
-rwxr-xr-x | rhimport-fe | 5 | ||||
-rwxr-xr-x | rhimport-fw | 5 | ||||
-rwxr-xr-x | rhimport-nw | 5 | ||||
-rwxr-xr-x | rhimport-o94n | 5 | ||||
-rwxr-xr-x | rhimport-oi | 6 | ||||
-rwxr-xr-x | rhimport-ra | 5 | ||||
-rwxr-xr-x | rhimport-rs | 5 | ||||
-rwxr-xr-x | rhimport-sm | 5 | ||||
-rwxr-xr-x | rhimport-sv | 5 | ||||
-rwxr-xr-x | rhimport-ut | 5 | ||||
-rwxr-xr-x | rhimport-zf | 2 | ||||
-rwxr-xr-x | rhimport-zfw | 5 |
14 files changed, 67 insertions, 1 deletions
diff --git a/rhimport-btl b/rhimport-btl index ad177b9..e212793 100755 --- a/rhimport-btl +++ b/rhimport-btl @@ -112,6 +112,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print $bdfile . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-dn b/rhimport-dn index 0468dc8..a23d32b 100755 --- a/rhimport-dn +++ b/rhimport-dn @@ -120,6 +120,11 @@ for my $entry ($files_feed->entries) { exit 0; } $out_file = $path[-1]; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print $1 . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; diff --git a/rhimport-fe b/rhimport-fe index c6fba81..fbcaca1 100755 --- a/rhimport-fe +++ b/rhimport-fe @@ -127,6 +127,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print $regexp . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-fw b/rhimport-fw index 7109198..8ce5ef5 100755 --- a/rhimport-fw +++ b/rhimport-fw @@ -138,6 +138,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bnum . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-nw b/rhimport-nw index 12dd2df..42f4aac 100755 --- a/rhimport-nw +++ b/rhimport-nw @@ -121,6 +121,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-o94n b/rhimport-o94n index 6299bc1..dc6ff54 100755 --- a/rhimport-o94n +++ b/rhimport-o94n @@ -140,6 +140,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-oi b/rhimport-oi index d596c0b..a08490d 100755 --- a/rhimport-oi +++ b/rhimport-oi @@ -113,6 +113,12 @@ for my $entry ($feed->entries) { my $ff = File::Fetch->new(uri => $entry->enclosure->url); $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } + print $broadcast_num . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; print "ok\n"; diff --git a/rhimport-ra b/rhimport-ra index 69f3310..c6c966f 100755 --- a/rhimport-ra +++ b/rhimport-ra @@ -123,6 +123,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bnum . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-rs b/rhimport-rs index 49f9564..b0387b4 100755 --- a/rhimport-rs +++ b/rhimport-rs @@ -167,6 +167,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-sm b/rhimport-sm index 12ed8e2..97e26ce 100755 --- a/rhimport-sm +++ b/rhimport-sm @@ -154,6 +154,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-sv b/rhimport-sv index 22f182f..34c4b03 100755 --- a/rhimport-sv +++ b/rhimport-sv @@ -153,6 +153,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-ut b/rhimport-ut index eb1cd3c..ef71c9c 100755 --- a/rhimport-ut +++ b/rhimport-ut @@ -123,6 +123,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdexp . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; diff --git a/rhimport-zf b/rhimport-zf index c255519..c780540 100755 --- a/rhimport-zf +++ b/rhimport-zf @@ -118,7 +118,7 @@ for my $entry ($feed->entries) { if(!rhimport::check_file_extension($out_file)) { print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; $dbh->disconnect(); - exit 0; + exit 1; } print $regexp . ": downloading " . $entry->enclosure->url . " (" . $entry->enclosure->length . " Bytes) .. "; diff --git a/rhimport-zfw b/rhimport-zfw index afc6cf5..f068e8b 100755 --- a/rhimport-zfw +++ b/rhimport-zfw @@ -126,6 +126,11 @@ for my $entry ($feed->entries) { exit 0; } $out_file = $ff->output_file; + if(!rhimport::check_file_extension($out_file)) { + print "\n\nThe extension of the matching file '". $out_file . "' seems to be wrong - manual import necessary!!!\n"; + $dbh->disconnect(); + exit 1; + } print " --> " . $bdfile . ": downloading " . $url . " (" . $enclosure->length . " Bytes) .. "; $file = $ff->fetch( to => '/tmp' ) or die $ff->error; |