libvideosite: use helper functions for _init_config_items
[videosite.git] / libvideosite.pm
index 10f1e81..ace6f81 100644 (file)
@@ -46,7 +46,8 @@ my $defaultconfig = {
             '_immutable' => '1',
             'schemas' => {},
         }
-    }
+    },
+    'config-version' => '2',
 };
 
 #
@@ -192,8 +193,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);
     }
 }