From 737d54bcd2d8f9c8ef5565d9692872e519494344 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Sat, 25 Jun 2022 16:55:25 -0700 Subject: [PATCH] fix episode selection menu on anime with 0- episodes --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 763c8b2..ccc7750 100755 --- a/ani-cli +++ b/ani-cli @@ -637,7 +637,7 @@ check_episode() { search_eps() { anime_id=$1 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" FIRST_EP_NUMBER=$(printf "%s" "$select_ep_result" | tail -n 1) LAST_EP_NUMBER=$(printf "%s" "$select_ep_result" | head -n 1)