14 getter => 'filegetter',
15 'plugin.youtube.QUALITY' => 'hd',
16 'plugin.filegetter.FILEPATTERN' => './%3$s.flv',
23 foreach (keys(%{$m})) {
24 printf("%s: %s\n", $_, defined($m->{$_})?$m->{$_}:'(undef)');
28 print("Downloading $m->{'TITLE'}\n");
34 GetOptions("i" => \$info, "d" => \$debug);
36 push(@INC, dirname(realpath($0)));
39 unless(libvideosite::register_api({
40 config_init => sub {},
41 config_save => sub {},
42 config_get => sub { return $config{join(".", @{$_[0]})} },
43 config_set => sub { $config{join(".", @{$_[0]})} = $_[1] },
44 config_has => sub { exists($config{join(".", @{$_[0]})}) },
45 config_del => sub { delete($config{join(".", @{$_[0]})}) },
46 link_callback => \&link_callback,
47 _debug => sub { return $debug },
49 die("Error registering API: $libvideosite::error");
52 unless(libvideosite::init()) {
53 die("Could not init libvideosite: $libvideosite::error");
57 printf("Handling %s...\n", $_);
58 libvideosite::check_for_link({
60 ewpf => sub { print @_, "\n" },