fix infinite loop on no results found

This commit is contained in:
ksyasuda 2022-07-10 05:26:30 -07:00
parent e8054c6cf2
commit 1c8afc16cc

View File

@ -299,12 +299,7 @@ search_anime() {
process_search() { process_search() {
progress "Searching $query.." progress "Searching $query.."
search_results=$(search_anime "$query") search_results=$(search_anime "$query")
while [ -z "$search_results" ]; do [ -z "$search_results" ] && die 'No search results found'
retry 'No search results found'
query="$REPLY $REPLY2"
progress "Searching $scrape.."
search_results=$(search_anime "$query")
done
lg "Search Results: $search_results" lg "Search Results: $search_results"
printf "%s\n" "$search_results" printf "%s\n" "$search_results"
} }