fix quoting in AsyncWgetFileGetter again
[videosite.git] / videosite-dl.pl
index 46c8b49..4222f78 100755 (executable)
@@ -18,6 +18,7 @@ my %config = (
     'plugin.youtube.QUALITY' => 'hd',
     'plugin.filegetter.FILEPATTERN' => './%3$s.flv',
 );
+my @options;
 
 sub link_callback {
     my $m = shift;
@@ -34,7 +35,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';
@@ -55,7 +57,7 @@ foreach (@ARGV) {
     printf("Handling %s...\n", $_);
     libvideosite::check_for_link({
         message => $_,
-        ewpf => sub { print @_, "\n" },
+        io => sub { print @_, "\n" },
         window => "",
     });
 }