libvideosite: Print config save status message
[videosite.git] / libvideosite.pm
index 426b0d2..8791c64 100644 (file)
@@ -65,7 +65,7 @@ my $remote_api = {
     color => sub { return '' },
     module_path => sub { return dirname(realpath($0)) },
     quote => sub { return $_ },
-    reset => sub {},
+    reload => sub {},
 };
 
 #
@@ -101,7 +101,7 @@ my $videosite_commands = {
     },
 
     'reload' => sub {
-        init();
+        $remote_api->{reload}->();
     },
 
     'mode' => sub {
@@ -523,7 +523,11 @@ sub _expand_url_shortener {
 # Save the config to durable storage
 #
 sub _cmd_save {
-    $remote_api->{config_save}->();
+    if ($remote_api->{config_save}->()) {
+        _io("Config saved");
+    } else {
+        _io(sprintf("%sConfig save failed%s", _colorpair("*red"), _colorpair()));
+    }
 }
 
 #