mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
fix anime query
This commit is contained in:
parent
69e4ee0c87
commit
95781fd750
7
ani-cli
7
ani-cli
@ -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
|
||||
|
@ -43,7 +43,11 @@ quit() {
|
||||
}
|
||||
|
||||
run() {
|
||||
"$CMD" "$*"
|
||||
if [[ "$VERBOSE" -eq 0 ]]; then
|
||||
"$CMD" "$*"
|
||||
else
|
||||
"$CMD" -v "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
log() {
|
||||
|
Loading…
Reference in New Issue
Block a user