--play-release command and bugfix
This commit is contained in:
11
src/main.sh
11
src/main.sh
@@ -66,6 +66,11 @@ if [ "${MUSICDIR:-}" ]; then
|
|||||||
list_artists
|
list_artists
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${1:-}" = "--play-release" ]; then
|
||||||
|
echo "Playing release $2" >>/tmp/foo
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${1:-}" = "--internal-preview-artist" ]; then
|
if [ "${1:-}" = "--internal-preview-artist" ]; then
|
||||||
@@ -246,7 +251,7 @@ if [ "${1:-}" = "--internal-list-releases" ]; then
|
|||||||
sort -n -r |
|
sort -n -r |
|
||||||
cut -d "$(printf '\t')" -f 2- |
|
cut -d "$(printf '\t')" -f 2- |
|
||||||
column -t -s "$(printf '\t')" |
|
column -t -s "$(printf '\t')" |
|
||||||
sed 's| \+\([0-9a-f-]\+\) \+\([^ ].*$\)$|\t\1\t\2|'
|
sed 's| \+\([0-9a-f-]\+\) *\(.*$\)$|\t\1\t\2|'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -370,7 +375,7 @@ if [ "${1:-}" = "--internal-list-local-releases" ]; then
|
|||||||
sort -n -r |
|
sort -n -r |
|
||||||
cut -d "$(printf '\t')" -f 2- |
|
cut -d "$(printf '\t')" -f 2- |
|
||||||
column -t -s "$(printf '\t')" |
|
column -t -s "$(printf '\t')" |
|
||||||
sed 's| \+\([0-9a-f-]\+\) \+\([^ ].*$\)$|\t\1\t\2|'
|
sed 's| \+\([0-9a-f-]\+\) *\(.*$\)$|\t\1\t\2|'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -449,7 +454,7 @@ while true; do
|
|||||||
--with-nth="{1}" \
|
--with-nth="{1}" \
|
||||||
--expect="ctrl-h,ctrl-a" \
|
--expect="ctrl-h,ctrl-a" \
|
||||||
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
|
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
|
||||||
--bind="enter:transform:echo \"play {}\" >> /tmp/foo" \
|
--bind="enter:execute-silent:$0 --play-release {3}" \
|
||||||
--bind="focus:transform:[ {3} ] && echo \"rebind:enter\" || echo \"unbind:enter\"" \
|
--bind="focus:transform:[ {3} ] && echo \"rebind:enter\" || echo \"unbind:enter\"" \
|
||||||
--bind="ctrl-l:accept" \
|
--bind="ctrl-l:accept" \
|
||||||
--bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/release/{r2}' &" \
|
--bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/release/{r2}' &" \
|
||||||
|
Reference in New Issue
Block a user