fix anime query

This commit is contained in:
ksyasuda 2021-11-11 15:17:55 -08:00
parent 69e4ee0c87
commit 95781fd750
2 changed files with 10 additions and 3 deletions

View File

@ -251,7 +251,7 @@ get_search_query() {
-config "$CFG_DIR/${ROFI_CFG}")
# Strip the list entry number from string
query="${query//[1-9]+\. /}"
query="$(awk '{print $NF}' <<< ${query//[1-9]+\. /})"
[ "$VERBOSE" -eq 1 ] && printf "%s\n" "Query: $query"
else
query=$*
@ -499,7 +499,7 @@ is_playlist=0
playlist_remove=0
playlist_add=0
playlist_file="$CFG_DIR/playlists/playlist.txt"
while getopts 'hd:HlpadP:s' OPT; do
while getopts 'hd:HlpadP:sv' OPT; do
case "$OPT" in
h)
help_text
@ -543,6 +543,9 @@ while getopts 'hd:HlpadP:s' OPT; do
s)
scrape=sync
;;
v)
VERBOSE=1
;;
*)
printf "%s\n" "Invalid option"
exit 1

View File

@ -43,7 +43,11 @@ quit() {
}
run() {
if [[ "$VERBOSE" -eq 0 ]]; then
"$CMD" "$*"
else
"$CMD" -v "$*"
fi
}
log() {