my $video = shift;
my $dlfile;
my $dirname;
+ my $res;
$dlfile = sprintf($self->_getval('FILEPATTERN'),
$self->_encode($video->{'SOURCE'}),
$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;
}