libvideosite: Add default value for config version
[videosite.git] / libvideosite.pm
index bebc8a5..38aba57 100644 (file)
@@ -1,3 +1,12 @@
+# library to autodownload flash videos
+#
+# (c) 2007-2008 by Ralf Ertzinger <ralf@camperquake.de>
+# licensed under GNU GPL v2
+#
+# Based on youtube.pl by Christian Garbs <mitch@cgarbs.de>
+# which in turn is
+# based on trigger.pl by Wouter Coekaerts <wouter@coekaerts.be>
+
 package libvideosite;
 require Exporter;
 
@@ -37,7 +46,8 @@ my $defaultconfig = {
             '_immutable' => '1',
             'schemas' => {},
         }
-    }
+    },
+    'config-version' => '2',
 };
 
 #
@@ -130,6 +140,8 @@ sub _io {
     my @text = @_;
     my $format;
 
+    @text = ('') unless(@text);
+
     # This will define the outputprefix once, so we don't have
     # do do this every time.
     $outputprefix = sprintf("%svideosite: %s",