mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07: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
|
else
|
||||||
get_search_query "$*"
|
get_search_query "$*"
|
||||||
fi
|
fi
|
||||||
anime_id="${query// /}"
|
anime_id="$query"
|
||||||
[ -z "$anime_id" ] && die "No anime selected or queried"
|
[ -z "$anime_id" ] && die "No anime selected or queried"
|
||||||
searched=0
|
searched=0
|
||||||
lg "Checking if anime: $anime_id has been searched before..."
|
lg "Checking if anime: $anime_id has been searched before..."
|
||||||
|
@ -128,6 +128,7 @@ get_search_query() {
|
|||||||
else
|
else
|
||||||
prompt "Search Anime"
|
prompt "Search Anime"
|
||||||
read -r query
|
read -r query
|
||||||
|
query="${query// /-}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +173,8 @@ get_search_query() {
|
|||||||
query=$(rofi -dpi "$DPI" -dmenu -l 15 -p "Search Anime:" \
|
query=$(rofi -dpi "$DPI" -dmenu -l 15 -p "Search Anime:" \
|
||||||
-mesg "$(generate_span "$msg")" \
|
-mesg "$(generate_span "$msg")" \
|
||||||
-config "$ROFI_CFG" -window-title 'aniwrapper' < <(run_stmt "$stmt"))
|
-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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user