diff --git a/src/main.sh b/src/main.sh index 36718d5..26d1d14 100755 --- a/src/main.sh +++ b/src/main.sh @@ -188,7 +188,7 @@ if [ "${1:-}" = "--internal-list-recordings" ]; then "$AWK_RECORDINGS" | sort -k1,1n -k 2,2n -r | cut -d "$(printf '\t')" -f 2- | - column -t -s "$(printf '\t')" -R 1,2,4 | + column -t -s "$(printf '\t')" -R 1,2,5 | sed 's| \+\([0-9a-f-]\+\)$|\t\1|' exit 0 fi @@ -237,6 +237,7 @@ while true; do --prompt="$(printf "$ARTIST_PROMPT" "$name")" \ --accept-nth="{2}" \ --with-nth="{1}" \ + --bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/release-group/{r2}' &" \ --bind="alt-1:change-query(!$secsymb ),alt-2:change-query($secsymb )" \ --bind="ctrl-d:half-page-down,ctrl-u:half-page-up" \ --bind="ctrl-r:reload:$0 --internal-list-releasegroups-fresh \"$2\"" @@ -260,22 +261,30 @@ while true; do --prompt="$(printf "$FULL_PROMPT" "$artist" "$title")" \ --accept-nth="{2}" \ --with-nth="{1}" \ + --bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/release/{r2}' &" \ --bind="ctrl-d:half-page-down,ctrl-u:half-page-up" ) [ "$sel" ] && set -- "--show-release" "$sel" ;; "--show-release") - $0 --internal-list-recordings "$2" | - $FZF \ - --ansi \ - --reverse \ - --cycle \ - --no-sort \ - --no-input \ - --delimiter="\t" \ - --accept-nth="{2}" \ - --with-nth="{1}" \ - --bind="ctrl-d:half-page-down,ctrl-u:half-page-up" + title="$(mb_release "$2" | + $JQ -r '.title')" + artist="$(mb_release "$2" | + $JQ -r '."artist-credit" | map(([.name, .joinphrase]|join(""))) | join("")')" + sel=$( + $0 --internal-list-recordings "$2" | + $FZF \ + --ansi \ + --reverse \ + --cycle \ + --no-sort \ + --delimiter="\t" \ + --prompt="$(printf "$FULL_PROMPT" "$artist" "$title")" \ + --accept-nth="{2}" \ + --with-nth="{1}" \ + --bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/track/{r2}' &" \ + --bind="ctrl-d:half-page-down,ctrl-u:half-page-up" + ) exit 0 ;; *) diff --git a/src/sh/theme.sh b/src/sh/theme.sh index 196be91..85a3c52 100644 --- a/src/sh/theme.sh +++ b/src/sh/theme.sh @@ -13,7 +13,7 @@ OFF="\033[m" # Prompts SEARCH_PROMPT=${SEARCH_PROMPT:-"๐Ÿ”Ž โŒช"} ARTIST_PROMPT="${ARTIST_PROMPT:-"๐ŸŽค ${CARTIST}%s$OFF โŒช"}" -FULL_PROMPT="${FULL_PROMPT:-"๐ŸŽค ${CARTIST}%s$OFF ยป ${CTITLE}%s$OFF โŒช"}" +FULL_PROMPT="${FULL_PROMPT:-"๐ŸŽค ${CARTIST}%s$OFF ใ€‹${CTITLE}%s$OFF โŒช"}" # Artist view AV_PERSON="${AV_PERSON:-"๐Ÿง‘โ€๐ŸŽค $CARTIST<>${OFF}"}"