improved workings
This commit is contained in:
19
src/main.sh
19
src/main.sh
@@ -121,10 +121,10 @@ if [ "${1:-}" = "--internal-list-releasegroups" ]; then
|
||||
-v format_demo="$FORMAT_TYPE_SECONDARY_DEMO" \
|
||||
-v format_fieldrec="$FORMAT_TYPE_SECONDARY_FIELDREC" \
|
||||
"$AWK_RELEASEGROUPS" |
|
||||
sort |
|
||||
sort -t "$(printf '\t')" -k 4 -n -r |
|
||||
sort -n -r |
|
||||
cut -d "$(printf '\t')" -f 2- |
|
||||
column -t -s "$(printf '\t')" |
|
||||
sed 's| \+[0-9]\+ \+\([0-9a-f-]\+\)$|\t\1|'
|
||||
sed 's| \+\([0-9a-f-]\+\)$|\t\1|'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
@@ -195,11 +195,7 @@ fi
|
||||
|
||||
if [ "${1:-}" = "--help" ]; then
|
||||
cat <<EOF
|
||||
Usage: $0 [ --help | --show-artist <mbid> ]
|
||||
|
||||
Options:
|
||||
--help: Show this help and exit.
|
||||
--show-artist <mbid>: Show releaes of the artist given by the MusicBrainz ID <mbid>.
|
||||
Usage: $0 [ --help | --show-artist <mbid> | --show-releasegroup <mbid> | --show-release <mbid> ]
|
||||
EOF
|
||||
exit 0
|
||||
fi
|
||||
@@ -302,14 +298,19 @@ while true; do
|
||||
--info-command="echo \"Search music artist\"" \
|
||||
--accept-nth="{1}" \
|
||||
--with-nth="{2}" \
|
||||
--expect="ctrl-l" \
|
||||
--preview-window="right,25%,border-left,wrap,<30(hidden)" \
|
||||
--preview="$0 --internal-preview-artist {1}" \
|
||||
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
|
||||
--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/{r1}' &" \
|
||||
--bind="change:execute-silent($0 --internal-search \$FZF_QUERY &)+reload($0 --internal-reload)"
|
||||
)
|
||||
[ "$sel" ] && set -- "--show-artist" "$sel"
|
||||
lns=$(echo "$sel" | wc -l)
|
||||
key=$(echo "$sel" | head -1 | tail -1)
|
||||
mid=$(echo "$sel" | head -2 | tail -1)
|
||||
[ "$mid" ] && set -- "--show-artist" "$mid"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
Reference in New Issue
Block a user