Subject: | video extension detection/setting is broken |
Once, I think filename was provided in the Content-Disposition of an image. No more! I have replaced the code in backup_photos with this:
if (($label eq 'Site MP4') || ($label eq 'Video Original')){
my $ua = LWP::UserAgent->new();
my $req = HTTP::Request->new('HEAD' => $source);
my $res = $ua->request($req);
my $headers = $res->headers();
my $type = $headers->content_type;
$type =~ m{^video/([-a-z0-9]+)};
$ext = $1 eq 'mp4' ? 'mp4'
: $1 ? "video-$1"
: "video-unknown";
$self->log()->info("video! $source has Content-Type $type becomes $ext");
}
I would be happy to cut a new release if you like.
--
rjbs