dmpc: add albumartist
This commit is contained in:
parent
b42125311e
commit
b22241980b
10
misc/dmpc
10
misc/dmpc
|
@ -5,6 +5,7 @@ replace=("-r")
|
|||
|
||||
zparseopts -E -D -K -help=help \
|
||||
a=artist -artist=artist \
|
||||
A=albumartist -albumartist=albumartist \
|
||||
b=album -album=album \
|
||||
t=title -title=title \
|
||||
j=jump -jump=jump \
|
||||
|
@ -21,6 +22,7 @@ if [ -n "$help" ]; then
|
|||
|
||||
Options:
|
||||
-a, --artist search for artist
|
||||
-A, --albumartist search for album artist
|
||||
-b, --album search for album
|
||||
-t, --title search for title
|
||||
-j, --jump jump to song in current playlist (requires rofi)
|
||||
|
@ -38,9 +40,9 @@ if [ -n "$help" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
if [[ -z "$artist" && -z "$album" && -z "$title" ]]; then
|
||||
if [[ -z "$artist" && -z "$album" && -z "$title" && -z "$albumartist" ]]; then
|
||||
<<-ERR
|
||||
At least one of -a, -b, -t or -j must be given. See --help for more information.
|
||||
At least one of -a, -A, -b, -t or -j must be given. See --help for more information.
|
||||
ERR
|
||||
exit 1
|
||||
fi
|
||||
|
@ -64,6 +66,10 @@ add_query() {
|
|||
queries+=$query
|
||||
}
|
||||
|
||||
if [[ -n $albumartist ]]; then
|
||||
add_query albumartist "$(dmenu_search albumartist)"
|
||||
fi
|
||||
|
||||
if [[ -n $artist ]]; then
|
||||
add_query albumartist "$(dmenu_search artist)"
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue