Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix filename for RTMP downloads so --play works.

  • Loading branch information...
commit ba64a70978ebc5cf8feb9924df48198218dc1324 1 parent 8c66052
@monsieurvideo monsieurvideo authored
Showing with 5 additions and 2 deletions.
  1. +5 −2 get_flash_videos
View
7 get_flash_videos
@@ -35,7 +35,7 @@ use FlashVideo::VideoPreferences;
unshift @INC, \&plugin_loader;
-use constant VERSION => "1.21";
+use constant VERSION => "1.22";
our %opt;
BEGIN {
@@ -337,15 +337,18 @@ sub download {
for my $data((ref($actual_url) eq 'ARRAY' ? @$actual_url : $actual_url)) {
my $downloader;
+ my $file = $save_as;
+
if(ref $data eq 'HASH') {
# RTMP data
$downloader = FlashVideo::RTMPDownloader->new;
+ $file ||= $data->{flv};
} else {
# HTTP
$downloader = FlashVideo::Downloader->new;
}
- my $size = $downloader->$action($data, $save_as, $browser) || return 0;
+ my $size = $downloader->$action($data, $file, $browser) || return 0;
info "\n" . ($remaining == 1 ? "Done. " : "")
. "Saved $size bytes to $downloader->{printable_filename}";
Please sign in to comment.
Something went wrong with that request. Please try again.