From 6dd2b4c27941cad88b4d31b279fab0707a789bd0 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Mon, 25 Apr 2022 19:49:05 -0700 Subject: [PATCH] update watch history highlighting when there is an episode 0 --- ani-cli | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 23bfab5..31e8727 100755 --- a/ani-cli +++ b/ani-cli @@ -678,7 +678,11 @@ episode_selection() { # Get Watch History for $anime_id as comma separated list watch_history="" while read -r i; do - [[ -z "$watch_history" ]] && watch_history="$((--i))" || watch_history="$watch_history, $((--i))" + if ((FIRST_EP_NUMBER == 0)); then + [[ -z "$watch_history" ]] && watch_history="$((i))" || watch_history="$watch_history, $((i))" + else + [[ -z "$watch_history" ]] && watch_history="$((--i))" || watch_history="$watch_history, $((--i))" + fi done < <(run_stmt "$stmt") lg "Episode watch history -> $watch_history"