removed redundant code
This commit is contained in:
34
src/main.sh
34
src/main.sh
@@ -537,40 +537,6 @@ while true; do
|
|||||||
[ "$key" = "tab" ] && set -- "--search-artist"
|
[ "$key" = "tab" ] && set -- "--search-artist"
|
||||||
[ "$lns" -eq 2 ] && [ ! "$key" ] && [ "$mid" ] && set -- "--releasegroup" "$mid"
|
[ "$lns" -eq 2 ] && [ ! "$key" ] && [ "$mid" ] && set -- "--releasegroup" "$mid"
|
||||||
;;
|
;;
|
||||||
"--artists")
|
|
||||||
sel=$(
|
|
||||||
printf "" |
|
|
||||||
$FZF \
|
|
||||||
--no-clear \
|
|
||||||
--ansi \
|
|
||||||
--reverse \
|
|
||||||
--no-sort \
|
|
||||||
--disabled \
|
|
||||||
--cycle \
|
|
||||||
--delimiter="\t" \
|
|
||||||
--prompt="$SEARCH_PROMPT" \
|
|
||||||
--info="inline-right" \
|
|
||||||
--info-command="echo \"Search music artist\"" \
|
|
||||||
--accept-nth="{2}" \
|
|
||||||
--with-nth="{1}" \
|
|
||||||
--preview-window="right,25%,border-left,wrap,<30(hidden)" \
|
|
||||||
--preview="$0 --internal-preview-artist {2}" \
|
|
||||||
--expect="ctrl-c,ctrl-q,tab" \
|
|
||||||
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
|
|
||||||
--bind="ctrl-l:accept" \
|
|
||||||
--bind="ctrl-d:half-page-down,ctrl-u:half-page-up" \
|
|
||||||
--bind="down:preview-half-page-down,up:preview-half-page-up" \
|
|
||||||
--bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/artist/{r2}' &" \
|
|
||||||
--bind="change:execute-silent($0 --internal-search artist \$FZF_QUERY &)+reload($0 --internal-reload)" || true
|
|
||||||
)
|
|
||||||
lns=$(echo "$sel" | wc -l)
|
|
||||||
key=$(echo "$sel" | head -1 | tail -1)
|
|
||||||
mid=$(echo "$sel" | head -2 | tail -1)
|
|
||||||
[ "$key" = "ctrl-c" ] && tput rmcup && exit 0
|
|
||||||
[ "$key" = "ctrl-q" ] && tput rmcup && exit 0
|
|
||||||
[ "$key" = "tab" ] && set -- "--search-releasegroup"
|
|
||||||
[ "$lns" -eq 2 ] && [ ! "$key" ] && [ "$mid" ] && set -- "--artist" "$mid"
|
|
||||||
;;
|
|
||||||
*)
|
*)
|
||||||
sel=$(
|
sel=$(
|
||||||
printf "" |
|
printf "" |
|
||||||
|
Reference in New Issue
Block a user