remove unneeded variable
[videosite.git] / videosite / FileGetter.pm
index e26d07d..b3c2660 100644 (file)
@@ -1,6 +1,9 @@
+# (c) 2007 by Ralf Ertzinger <ralf@camperquake.de>
+# licensed under GNU GPL v2
 #
 # A getter which will download the media to a local file storage
 #
+
 package FileGetter;
 
 use GetterBase;
@@ -28,6 +31,7 @@ sub get {
     my $video = shift;
     my $dlfile;
     my $dirname;
+    my $res;
 
     $dlfile = sprintf($self->_getval('FILEPATTERN'),
         $self->_encode($video->{'SOURCE'}),
@@ -44,8 +48,8 @@ sub get {
 
     $self->debug('Going to download %s to %s', $video->{'DLURL'}, $dlfile);
 
-    if (200 != LWP::Simple::mirror($video->{'DLURL'}, $dlfile)) {
-        $self->error('Could not download %s to %s', $video->{'DLURL'}, $dlfile);
+    if (200 != ($res = LWP::Simple::mirror($video->{'DLURL'}, $dlfile))) {
+        $self->error('Could not download %s to %s (%s)', $video->{'DLURL'}, $dlfile, $res);
         return 0;
     }