git://git.camperquake.de
/
videosite.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add proper config_save callbacks
[videosite.git]
/
libvideosite.pm
diff --git
a/libvideosite.pm
b/libvideosite.pm
index
bd4e46a
..
8791c64
100644
(file)
--- a/
libvideosite.pm
+++ b/
libvideosite.pm
@@
-65,7
+65,7
@@
my $remote_api = {
color => sub { return '' },
module_path => sub { return dirname(realpath($0)) },
quote => sub { return $_ },
color => sub { return '' },
module_path => sub { return dirname(realpath($0)) },
quote => sub { return $_ },
- re
set
=> sub {},
+ re
load
=> sub {},
};
#
};
#
@@
-101,7
+101,7
@@
my $videosite_commands = {
},
'reload' => sub {
},
'reload' => sub {
- $remote_api->{re
set
}->();
+ $remote_api->{re
load
}->();
},
'mode' => sub {
},
'mode' => sub {
@@
-523,7
+523,11
@@
sub _expand_url_shortener {
# Save the config to durable storage
#
sub _cmd_save {
# 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()));
+ }
}
#
}
#