mirror of
https://github.com/ksyasuda/aniwrapper.git
synced 2024-10-28 04:44:11 -07:00
refactor stream function to match check_db return code
This commit is contained in:
parent
acb236ce23
commit
47f9ca19ae
10
ani-cli
10
ani-cli
@ -737,17 +737,17 @@ stream() {
|
||||
[ -z "$anime_id" ] && die "No anime selected or queried"
|
||||
searched=0
|
||||
lg "Checking if anime: $anime_id has been searched before..."
|
||||
if check_db "search" "$anime_id"; then
|
||||
if ! check_db "search" "$anime_id"; then
|
||||
lg "$anime_id has been searched before"
|
||||
selection_id="$anime_id"
|
||||
insert_history "search" "$anime_id" &
|
||||
search_eps "$anime_id"
|
||||
else
|
||||
search_results=$(process_search $query) # want word splitting to account for both input cases
|
||||
[ -z "$search_results" ] && die
|
||||
if ! anime_selection "$search_results"; then
|
||||
die "No anime selection found"
|
||||
fi
|
||||
else
|
||||
selection_id="$anime_id"
|
||||
insert_history "search" "$anime_id" &
|
||||
search_eps "$anime_id"
|
||||
fi
|
||||
if (((FIRST_EP_NUMBER == LAST_EP_NUMBER && FIRST_EP_NUMBER == 1))); then
|
||||
ep_choice_start=1
|
||||
|
Loading…
Reference in New Issue
Block a user