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 \
|
zparseopts -E -D -K -help=help \
|
||||||
a=artist -artist=artist \
|
a=artist -artist=artist \
|
||||||
|
A=albumartist -albumartist=albumartist \
|
||||||
b=album -album=album \
|
b=album -album=album \
|
||||||
t=title -title=title \
|
t=title -title=title \
|
||||||
j=jump -jump=jump \
|
j=jump -jump=jump \
|
||||||
|
@ -21,6 +22,7 @@ if [ -n "$help" ]; then
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
-a, --artist search for artist
|
-a, --artist search for artist
|
||||||
|
-A, --albumartist search for album artist
|
||||||
-b, --album search for album
|
-b, --album search for album
|
||||||
-t, --title search for title
|
-t, --title search for title
|
||||||
-j, --jump jump to song in current playlist (requires rofi)
|
-j, --jump jump to song in current playlist (requires rofi)
|
||||||
|
@ -38,9 +40,9 @@ if [ -n "$help" ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z "$artist" && -z "$album" && -z "$title" ]]; then
|
if [[ -z "$artist" && -z "$album" && -z "$title" && -z "$albumartist" ]]; then
|
||||||
<<-ERR
|
<<-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
|
ERR
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
@ -64,6 +66,10 @@ add_query() {
|
||||||
queries+=$query
|
queries+=$query
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if [[ -n $albumartist ]]; then
|
||||||
|
add_query albumartist "$(dmenu_search albumartist)"
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ -n $artist ]]; then
|
if [[ -n $artist ]]; then
|
||||||
add_query albumartist "$(dmenu_search artist)"
|
add_query albumartist "$(dmenu_search artist)"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue