fix episode selection menu on anime with 0- episodes

This commit is contained in:
ksyasuda 2022-06-25 16:55:25 -07:00
parent 7d574f7a6f
commit 737d54bcd2

View File

@ -637,7 +637,7 @@ check_episode() {
search_eps() { search_eps() {
anime_id=$1 anime_id=$1
lg "Searching for episodes of $anime_id" lg "Searching for episodes of $anime_id"
select_ep_result=$(check_episode "$anime_id-episode-1" "$anime_id" | sed -E 's/\-episode\-//') select_ep_result=$(check_episode "$anime_id-episode-1" "$anime_id" | sed -E 's/\-episode\-//' | sed -E 's/0-.//')
lg "Select Episode Result: $select_ep_result" lg "Select Episode Result: $select_ep_result"
FIRST_EP_NUMBER=$(printf "%s" "$select_ep_result" | tail -n 1) FIRST_EP_NUMBER=$(printf "%s" "$select_ep_result" | tail -n 1)
LAST_EP_NUMBER=$(printf "%s" "$select_ep_result" | head -n 1) LAST_EP_NUMBER=$(printf "%s" "$select_ep_result" | head -n 1)