git://git.camperquake.de
/
videosite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
videosite-dl: Add -o option
[videosite.git]
/
videosite-dl.pl
diff --git
a/videosite-dl.pl
b/videosite-dl.pl
index
46c8b49
..
b761e18
100755
(executable)
--- a/
videosite-dl.pl
+++ b/
videosite-dl.pl
@@
-16,8
+16,10
@@
my %config = (
mode => 'download',
getter => 'filegetter',
'plugin.youtube.QUALITY' => 'hd',
mode => 'download',
getter => 'filegetter',
'plugin.youtube.QUALITY' => 'hd',
+ 'plugin.youtube.ADAPTIVE' => 1,
'plugin.filegetter.FILEPATTERN' => './%3$s.flv',
);
'plugin.filegetter.FILEPATTERN' => './%3$s.flv',
);
+my @options;
sub link_callback {
my $m = shift;
sub link_callback {
my $m = shift;
@@
-34,7
+36,8
@@
sub link_callback {
}
}
-GetOptions("i" => \$info, "d" => \$debug);
+GetOptions("i" => \$info, "d" => \$debug, "o=s" => \@options);
+%config = (%config, map { split(/=/, $_, 2) } @options);
push(@INC, dirname(realpath($0)));
load 'libvideosite';
push(@INC, dirname(realpath($0)));
load 'libvideosite';
@@
-55,7
+58,7
@@
foreach (@ARGV) {
printf("Handling %s...\n", $_);
libvideosite::check_for_link({
message => $_,
printf("Handling %s...\n", $_);
libvideosite::check_for_link({
message => $_,
-
ewpf
=> sub { print @_, "\n" },
+
io
=> sub { print @_, "\n" },
window => "",
});
}
window => "",
});
}