diff options
author | Rasmus Steinke <rasi@xssn.at> | 2017-09-21 22:12:13 +0200 |
---|---|---|
committer | Rasmus Steinke <rasi@xssn.at> | 2017-09-21 22:12:13 +0200 |
commit | 67d61ea59a8e2e67e7e9a7b47782461da51a4dca (patch) | |
tree | 497cc8823a7b0758c11bdecb0d503d547e35e2f2 /clerk | |
parent | 151ca161cd0ef3a0cab25f3aa82fdac97b653f62 (diff) | |
download | perl-app-clerk-67d61ea59a8e2e67e7e9a7b47782461da51a4dca.tar.gz perl-app-clerk-67d61ea59a8e2e67e7e9a7b47782461da51a4dca.tar.xz |
use proper OR
Diffstat (limited to 'clerk')
-rwxr-xr-x | clerk | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -206,7 +206,7 @@ sub backend_call { "--bind=esc:$random,alt-a:toggle-all,alt-n:deselect-all", "--with-nth=$fields" ], - rofi => [ "rofi", "-width", "2400", "-lines", "40", "-matching", "regex", "-dmenu", "-kb-row-tab", "", "-kb-move-word-forward", "", "-kb-accept-alt", "Tab", "-multi-select", "-no-levensthein-sort", "-i", "-p", "> " , "-filter", $minimal ] + rofi => [ "rofi", "-width", "1300", "-matching", "regex", "-dmenu", "-kb-row-tab", "", "-kb-move-word-forward", "", "-kb-accept-alt", "Tab", "-multi-select", "-no-levensthein-sort", "-i", "-p", "> " , "-filter", $minimal ] ); my $handle = start $backends{$backend} // die('backend not found'), \$input, \$out; $input = join "", (@{$in}); @@ -354,12 +354,12 @@ sub do_action { } } } elsif ($context eq "tracks") { - my @action_items = ("Add\n", "Replace\n", "Rate\n"); + my @action_items = ("Add\n", "Replace\n", "Rate Track\n"); $action = backend_call(\@action_items); if ($action eq "Replace\n") { $mpd->clear(); } - if ($action eq "Rate\n") { + if ($action eq "Rate Track\n") { my @rating_value = ("1\n", "2\n", "3\n", "4\n", "5\n", "6\n", "7\n", "8\n", "9\n", "10\n"); my $rating; $rating = backend_call(\@rating_value); @@ -371,7 +371,7 @@ sub do_action { $mpd->sticker_value("song", "$uri", "rating", "$rating") } } - elsif ($action eq "Add\n" // $action eq "Replace\n") { + elsif ($action eq "Add\n" || $action eq "Replace\n") { my $input; foreach my $line (split /\n/, $in) { my $uri = (split /[\t\n]/, $line)[-1]; |