git://git.camperquake.de
/
videosite.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
6a9455d
)
libvideosite: Switch to display mode, if /nosave is given in the message
author
Ralf Ertzinger
<ralf@skytale.net>
Fri, 3 May 2013 18:54:57 +0000
(20:54 +0200)
committer
Ralf Ertzinger
<ralf@skytale.net>
Fri, 3 May 2013 18:54:57 +0000
(20:54 +0200)
libvideosite.pm
patch
|
blob
|
history
diff --git
a/libvideosite.pm
b/libvideosite.pm
index
3dfe1c3
..
bc41e5c
100644
(file)
--- a/
libvideosite.pm
+++ b/
libvideosite.pm
@@
-992,11
+992,15
@@
sub check_for_link {
my $m;
my $p;
my $skip;
my $m;
my $p;
my $skip;
+ my $mode = _config_get(['mode']);
- # Look if we should ignore this line
+ #
+ # If /nosave is present in the message switch to display mode, regardless
+ # of config setting
+ #
if ($message =~ m,(?:\s|^)/nosave(?:\s|$),) {
if ($message =~ m,(?:\s|^)/nosave(?:\s|$),) {
-
return
;
+
$mode = 'display'
;
}
_push_output($event->{ewpf});
}
_push_output($event->{ewpf});
@@
-1014,7
+1018,7
@@
sub check_for_link {
$skip = $remote_api->{link_callback}->($m);
}
unless($skip) {
$skip = $remote_api->{link_callback}->($m);
}
unless($skip) {
- if ('download' eq
_config_get(['mode'])
) {
+ if ('download' eq
$mode
) {
_io(
sprintf('%s>>> %sSaving %s%%s%s %s%%s',
_colorpair('*red'),
_io(
sprintf('%s>>> %sSaving %s%%s%s %s%%s',
_colorpair('*red'),
@@
-1029,7
+1033,7
@@
sub check_for_link {
unless($getter->get($m)) {
_io(sprintf('%s>>> FAILED', _colorpair('*red')));
}
unless($getter->get($m)) {
_io(sprintf('%s>>> FAILED', _colorpair('*red')));
}
- } elsif ('display' eq
_config_get(['mode'])
) {
+ } elsif ('display' eq
$mode
) {
_io(
sprintf('%s>>> %sSaw %s%%s%s %s%%s',
_colorpair('*magenta'),
_io(
sprintf('%s>>> %sSaw %s%%s%s %s%%s',
_colorpair('*magenta'),