minor improvements

This commit is contained in:
2025-10-10 10:17:53 +02:00
parent 08ea6cf56c
commit 05661c0d98
4 changed files with 23 additions and 4 deletions

View File

@@ -66,6 +66,8 @@ BEGIN {
ds = dur % 60
if (ds <= 9)
ds = "0"ds
if (dh && dm <=9)
dm = "0"dm
dur = dh ? dh":"dm":"ds : dm":"ds
} else {
dur = "??:??"

View File

@@ -603,6 +603,7 @@ while true; do
--border-label="$TITLE_PLYLST" \
--no-input \
--margin="2%,10%" \
--bind="$KEYS_I_NORMAL:" \
--bind="$KEYS_DOWN,$KEYS_N_DOWN:down" \
--bind="$KEYS_UP,$KEYS_N_UP:up" \
--bind="$KEYS_HALFPAGE_DOWN:half-page-down" \

View File

@@ -16,6 +16,10 @@ fzf_command_set_header() {
$JQ '[.id, type, .name, .disambiguation] | join("\t")' |
awk_artist_header
)"
if [ ! "$header" ]; then
header="Possibly $mbid is not a MusicBrainz Artist ID"
err "$header"
fi
;;
"$VIEW_RELEASEGROUP")
header="$(
@@ -30,6 +34,10 @@ fzf_command_set_header() {
] | join("\t")' |
awk_releasegroup_header
)"
if [ ! "$header" ]; then
header="Possibly $mbid is not a MusicBrainz Release-Group ID"
err "$header"
fi
;;
"$VIEW_RELEASE")
header="$(
@@ -48,7 +56,15 @@ fzf_command_set_header() {
] | join("\t")' |
awk_release_header
)"
if [ ! "$header" ]; then
header="Possibly $mbid is not a MusicBrainz Release ID"
err "$header"
fi
;;
*)
header="We entered an unknown state"
err "$header"
;;
esac
printf "+change-header(%s)" "${header:-"???"}"
printf "+change-header(%s)" "$header"
}

View File

@@ -281,7 +281,8 @@ print_keybindings() {
"$KEYS_N_TOP" "Go to first entry" \
"$KEYS_N_BOT" "Go to last entry" \
"$KEYS_OUT,$KEYS_N_OUT,$KEYS_QUIT,$KEYS_N_QUIT" "Leave playlist view" \
"$KEYS_SELECT_ARTIST" "Go to artist of selected item"
"$KEYS_SELECT_ARTIST" "Go to artist of selected item" \
"$KEYS_PLAYLIST_GOTO_RELEASE" "Show release of selected track"
__keybindinggroup_from_args "Views" \
"$KEYS_LIST_ARTISTS" "Display artists in local database" \
"$KEYS_LIST_ALBUMS" "Display albums in local database" \
@@ -296,8 +297,7 @@ print_keybindings() {
"$KEYS_PLAYLIST_CLEAR_ABOVE" "Remove all tracks above" \
"$KEYS_PLAYLIST_CLEAR_BELOW" "Remove all tracks below" \
"$KEYS_PLAYLIST_SHUFFLE" "Shuffle" \
"$KEYS_PLAYLIST_UNSHUFFLE" "Undo shuffle" \
"$KEYS_PLAYLIST_GOTO_RELEASE" "Show release of selected track"
"$KEYS_PLAYLIST_UNSHUFFLE" "Undo shuffle"
__keybindinggroup_from_args "Playback" \
"$KEYS_PLAY,$KEYS_N_PLAY" "Play selected item" \
"$KEYS_QUEUE,$KEYS_N_QUEUE" "Queue selected item" \