X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite%2FFileGetter.pm;h=b3c2660dd7c801e527d898d03f835bee4c1867af;hb=f4e967629fadde25e2cb91c8edc1c61d4c9a06b1;hp=e26d07d261bb6af5d5df56c48de88598a4f734ab;hpb=35306939804820c033c8e25ab5aa5134f5dc5735;p=videosite.git diff --git a/videosite/FileGetter.pm b/videosite/FileGetter.pm index e26d07d..b3c2660 100644 --- a/videosite/FileGetter.pm +++ b/videosite/FileGetter.pm @@ -1,6 +1,9 @@ +# (c) 2007 by Ralf Ertzinger +# 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; }