minor bug fixes

This commit is contained in:
2025-08-25 15:10:56 +02:00
parent b56d691041
commit 58930c75e1
2 changed files with 7 additions and 8 deletions

View File

@@ -46,7 +46,7 @@ if [ "${1:-}" = "--decorate" ]; then
exit 0
fi
if [ "$MUSICDIR" ] && [ "${1:-}" = "--load-local" ]; then
if [ "${MUSICDIR:-}" ] && [ "${1:-}" = "--load-local" ]; then
load_local || err "Failed to load local data"
exit 0
fi
@@ -483,7 +483,6 @@ while true; do
[ "$lns" -eq 2 ] && [ "$key" = "ctrl-a" ] && set -- "--select-artist" "$(mb_releasegroup "$mid" | $JQ -r '."artist-credit"')"
;;
"--releasegroup")
set -x
title="$(mb_releasegroup "$2" |
$JQ -r '.title')"
artist="$(mb_releasegroup "$2" |
@@ -669,7 +668,7 @@ while true; do
--bind="focus:transform:[ {3} ] && echo \"rebind:enter\" || echo \"unbind:enter\"" \
--bind="ctrl-l:accept" \
--bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/release/{r2}' &" \
--bind="ctrl-d:half-page-down,ctrl-u:half-page-up"
--bind="ctrl-d:half-page-down,ctrl-u:half-page-up" || true
)
lns=$(echo "$sel" | wc -l)
key=$(echo "$sel" | head -1 | tail -1)
@@ -705,7 +704,7 @@ while true; do
--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="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/artist/{r2}' &" || true
)
lns=$(echo "$sel" | wc -l)
key=$(echo "$sel" | head -1 | tail -1)