play hook on releases view

This commit is contained in:
2025-08-23 14:56:29 +02:00
parent 6776d817a4
commit c29d36a56e
2 changed files with 6 additions and 4 deletions

View File

@@ -4,7 +4,7 @@ BEGIN {
delete local_releases[0]
if (file_local_releases) {
while ((getline < file_local_releases) == 1)
local_releases[$1] = 1
local_releases[$1] = $2
close(file_local_releases)
}
}
@@ -54,5 +54,5 @@ BEGIN {
sortk = year ? year : 0
if (local_releases[id])
line = format_local line
print sortk, line, id
print sortk, line, id, local_releases[id]
}

View File

@@ -246,7 +246,7 @@ if [ "${1:-}" = "--internal-list-releases" ]; then
sort -n -r |
cut -d "$(printf '\t')" -f 2- |
column -t -s "$(printf '\t')" |
sed 's| \+\([0-9a-f-]\+\)$|\t\1|'
sed 's| \+\([0-9a-f-]\+\) \+\([^ ].*$\)$|\t\1\t\2|'
exit 0
fi
@@ -370,7 +370,7 @@ if [ "${1:-}" = "--internal-list-local-releases" ]; then
sort -n -r |
cut -d "$(printf '\t')" -f 2- |
column -t -s "$(printf '\t')" |
sed 's| \+\([0-9a-f-]\+\)$|\t\1|'
sed 's| \+\([0-9a-f-]\+\) \+\([^ ].*$\)$|\t\1\t\2|'
exit 0
fi
@@ -449,6 +449,8 @@ while true; do
--with-nth="{1}" \
--expect="ctrl-h,ctrl-a" \
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
--bind="enter:transform:echo \"play {}\" >> /tmp/foo" \
--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"