mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-11-22 03:19:53 -08:00
fix multiword searches from menu (#11)
This commit is contained in:
parent
1c8afc16cc
commit
fa108d860f
2
ani-cli
2
ani-cli
@ -415,7 +415,7 @@ stream() {
|
||||
else
|
||||
get_search_query "$*"
|
||||
fi
|
||||
anime_id="${query// /}"
|
||||
anime_id="$query"
|
||||
[ -z "$anime_id" ] && die "No anime selected or queried"
|
||||
searched=0
|
||||
lg "Checking if anime: $anime_id has been searched before..."
|
||||
|
@ -128,6 +128,7 @@ get_search_query() {
|
||||
else
|
||||
prompt "Search Anime"
|
||||
read -r query
|
||||
query="${query// /-}"
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -173,7 +173,8 @@ get_search_query() {
|
||||
query=$(rofi -dpi "$DPI" -dmenu -l 15 -p "Search Anime:" \
|
||||
-mesg "$(generate_span "$msg")" \
|
||||
-config "$ROFI_CFG" -window-title 'aniwrapper' < <(run_stmt "$stmt"))
|
||||
query="${query//[1-9]*\. /}"
|
||||
query="${query#*\. }" # remove [1-9]. from beginning of query
|
||||
query="${query// /-}" # replace spaces with -
|
||||
fi
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user