improved workings
This commit is contained in:
@@ -48,6 +48,6 @@ BEGIN { OFS="\t" }
|
|||||||
sub("<<artist>>", artistcredit, line_release)
|
sub("<<artist>>", artistcredit, line_release)
|
||||||
line_year = year ? format_year : ""
|
line_year = year ? format_year : ""
|
||||||
sub("<<year>>", year, line_year)
|
sub("<<year>>", year, line_year)
|
||||||
sort = year ? year : 0
|
sortk = year ? year : 0
|
||||||
print line_type, line_release, line_year, line_sectype, sort, id
|
print sortk, line_type, line_release, line_year, line_sectype, id
|
||||||
}
|
}
|
||||||
|
19
src/main.sh
19
src/main.sh
@@ -121,10 +121,10 @@ if [ "${1:-}" = "--internal-list-releasegroups" ]; then
|
|||||||
-v format_demo="$FORMAT_TYPE_SECONDARY_DEMO" \
|
-v format_demo="$FORMAT_TYPE_SECONDARY_DEMO" \
|
||||||
-v format_fieldrec="$FORMAT_TYPE_SECONDARY_FIELDREC" \
|
-v format_fieldrec="$FORMAT_TYPE_SECONDARY_FIELDREC" \
|
||||||
"$AWK_RELEASEGROUPS" |
|
"$AWK_RELEASEGROUPS" |
|
||||||
sort |
|
sort -n -r |
|
||||||
sort -t "$(printf '\t')" -k 4 -n -r |
|
cut -d "$(printf '\t')" -f 2- |
|
||||||
column -t -s "$(printf '\t')" |
|
column -t -s "$(printf '\t')" |
|
||||||
sed 's| \+[0-9]\+ \+\([0-9a-f-]\+\)$|\t\1|'
|
sed 's| \+\([0-9a-f-]\+\)$|\t\1|'
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -195,11 +195,7 @@ fi
|
|||||||
|
|
||||||
if [ "${1:-}" = "--help" ]; then
|
if [ "${1:-}" = "--help" ]; then
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
Usage: $0 [ --help | --show-artist <mbid> ]
|
Usage: $0 [ --help | --show-artist <mbid> | --show-releasegroup <mbid> | --show-release <mbid> ]
|
||||||
|
|
||||||
Options:
|
|
||||||
--help: Show this help and exit.
|
|
||||||
--show-artist <mbid>: Show releaes of the artist given by the MusicBrainz ID <mbid>.
|
|
||||||
EOF
|
EOF
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
@@ -302,14 +298,19 @@ while true; do
|
|||||||
--info-command="echo \"Search music artist\"" \
|
--info-command="echo \"Search music artist\"" \
|
||||||
--accept-nth="{1}" \
|
--accept-nth="{1}" \
|
||||||
--with-nth="{2}" \
|
--with-nth="{2}" \
|
||||||
|
--expect="ctrl-l" \
|
||||||
--preview-window="right,25%,border-left,wrap,<30(hidden)" \
|
--preview-window="right,25%,border-left,wrap,<30(hidden)" \
|
||||||
--preview="$0 --internal-preview-artist {1}" \
|
--preview="$0 --internal-preview-artist {1}" \
|
||||||
|
--bind="load:transform:[ \"\$FZF_TOTAL_COUNT\" -gt 0 ] && echo \"rebind:ctrl-l\" || echo \"unbind:ctrl-l\"" \
|
||||||
--bind="ctrl-d:half-page-down,ctrl-u:half-page-up" \
|
--bind="ctrl-d:half-page-down,ctrl-u:half-page-up" \
|
||||||
--bind="down:preview-half-page-down,up:preview-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/{r1}' &" \
|
--bind="alt-b:execute-silent:xdg-open 'https://musicbrainz.org/artist/{r1}' &" \
|
||||||
--bind="change:execute-silent($0 --internal-search \$FZF_QUERY &)+reload($0 --internal-reload)"
|
--bind="change:execute-silent($0 --internal-search \$FZF_QUERY &)+reload($0 --internal-reload)"
|
||||||
)
|
)
|
||||||
[ "$sel" ] && set -- "--show-artist" "$sel"
|
lns=$(echo "$sel" | wc -l)
|
||||||
|
key=$(echo "$sel" | head -1 | tail -1)
|
||||||
|
mid=$(echo "$sel" | head -2 | tail -1)
|
||||||
|
[ "$mid" ] && set -- "--show-artist" "$mid"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Reference in New Issue
Block a user