X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=videosite-dl.pl;h=688efb34eea9b0b81667058c0bb058691f386b5b;hb=20de709f626017479b48e4d2db1a80faf021901a;hp=769ab43d198d154a4bf53d5a2a319e9c76355fee;hpb=3e72db83fd003843f1880e12d5c706f47e151f97;p=videosite.git diff --git a/videosite-dl.pl b/videosite-dl.pl index 769ab43..688efb3 100755 --- a/videosite-dl.pl +++ b/videosite-dl.pl @@ -6,6 +6,9 @@ use File::Spec; use File::Basename; use Module::Load; use Cwd qw(realpath); +use Carp; + +$SIG{ __DIE__ } = sub { Carp::confess( @_ ) }; my $info = 0; my $debug = 0; @@ -13,6 +16,7 @@ my %config = ( mode => 'download', getter => 'filegetter', 'plugin.youtube.QUALITY' => 'hd', + 'plugin.youtube.ADAPTIVE' => 1, 'plugin.filegetter.FILEPATTERN' => './%3$s.flv', ); @@ -37,13 +41,8 @@ push(@INC, dirname(realpath($0))); load 'libvideosite'; unless(libvideosite::register_api({ - config_init => sub {}, - config_save => sub {}, - config_get => sub { return $config{join(".", @{$_[0]})} }, - config_set => sub { $config{join(".", @{$_[0]})} = $_[1] }, - config_has => sub { exists($config{join(".", @{$_[0]})}) }, - config_del => sub { delete($config{join(".", @{$_[0]})}) }, link_callback => \&link_callback, + _config_default => sub { return \%config }, _debug => sub { return $debug }, })) { die("Error registering API: $libvideosite::error"); @@ -57,6 +56,7 @@ foreach (@ARGV) { printf("Handling %s...\n", $_); libvideosite::check_for_link({ message => $_, - ewpf => sub { print @_, "\n" }, + io => sub { print @_, "\n" }, + window => "", }); }