From f218b34e2134528f5a39d57afd02ff8fd6be2b11 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Sat, 4 Jun 2022 16:37:55 -0700 Subject: [PATCH] make autoplay stop after last episode --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 10703b7..bc8e234 100755 --- a/ani-cli +++ b/ani-cli @@ -811,7 +811,7 @@ open_episode() { if ((is_autoplay == 1)); then lg "Waiting for video to finish playing..." wait "$PID" - if continue_watching; then + if ((episode + 1 <= LAST_EP_NUMBER)) && continue_watching; then open_episode "$anime_id" "$((episode + 1))" "$ddir" else exit 0