This commit is contained in:
2025-07-23 10:45:28 +02:00
parent 81e49c0984
commit dcba30bf94
2 changed files with 5 additions and 4 deletions

View File

@@ -136,13 +136,14 @@ fi
while true; do
case "${1:-}" in
"--show-artist")
name=$(mb_artist "$2" | $JQ -r '.name')
sel=$(
$0 --internal-list-releases "$2" |
$FZF \
--ansi \
--reverse \
--delimiter="\t" \
--prompt="$(printf "$ARTIST_PROMPT" "$3")" \
--prompt="$(printf "$ARTIST_PROMPT" "$name")" \
--accept-nth="{2}" \
--with-nth="{1}"
)
@@ -158,13 +159,13 @@ while true; do
--disabled \
--delimiter="\t" \
--prompt="$SEARCH_PROMPT" \
--accept-nth="{1} {2}" \
--accept-nth="{1}" \
--with-nth="{2}" \
--preview-window="wrap" \
--preview="$0 --internal-preview-artist {1}" \
--bind="change:execute-silent($0 --internal-search \$FZF_QUERY &)+reload($0 --internal-reload)"
)
[ "$sel" ] && set -- "--show-artist" "$(echo "$sel" | cut -d " " -f 1)" "$(echo "$sel" | cut -d " " -f2-)"
[ "$sel" ] && set -- "--show-artist" "$sel"
;;
esac
done

View File

@@ -52,5 +52,5 @@ mb_artist_enwikipedia() {
__api_wikipedia_en_get_summary "$wikiid" | cache_put_artist_enwikipedia "$1"
enwiki="$(cache_get_artist_enwikipedia "$1")"
fi
echo "$enwiki"
[ ! "$enwiki" ] || [ "$enwiki" != "null" ] || return
}