X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=libvideosite.pm;h=12fa60355fbab15cc7b7105fc12f6ef73f8d9324;hb=d9024dd1ed28a0874174c9050ba2112e6e8aa0d5;hp=b581e5a1503354d6b58fa80598c864d5794a798c;hpb=8a35ad996dcea67721b8ba74afbfbc90a10ecbfe;p=videosite.git diff --git a/libvideosite.pm b/libvideosite.pm index b581e5a..12fa603 100644 --- a/libvideosite.pm +++ b/libvideosite.pm @@ -1,3 +1,12 @@ +# library to autodownload flash videos +# +# (c) 2007-2008 by Ralf Ertzinger +# licensed under GNU GPL v2 +# +# Based on youtube.pl by Christian Garbs +# which in turn is +# based on trigger.pl by Wouter Coekaerts + package libvideosite; require Exporter; @@ -37,7 +46,8 @@ my $defaultconfig = { '_immutable' => '1', 'schemas' => {}, } - } + }, + 'config-version' => '2', }; # @@ -173,6 +183,9 @@ sub _recursive_hash_walk { sub _colorpair { my ($fg, $bg) = @_; + $fg = defined($fg)?$fg:'default'; + $bg = defined($bg)?$bg:'default'; + return $remote_api->{color}->($fg, $bg); } @@ -183,8 +196,8 @@ sub _init_config_item { my $path = shift; my $value = shift; - unless($remote_api->{config_has}->($path)) { - $remote_api->{config_set}->($path, $value); + unless(_config_has($path)) { + _config_set($path, $value); } }