From d9fffbf43728d89531be14267502b5d11c9a87e4 Mon Sep 17 00:00:00 2001 From: topazrn <40129033+topazrn@users.noreply.github.com> Date: Wed, 29 Jan 2025 14:11:56 +1100 Subject: [PATCH] feat: fetch chapter information regardless of --skip argument --- ani-cli | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ani-cli b/ani-cli index 4d59379c..04b44cf9 100755 --- a/ani-cli +++ b/ani-cli @@ -1,6 +1,6 @@ #!/bin/sh -version_number="4.9.6" +version_number="4.9.7" # UI @@ -274,7 +274,9 @@ download() { play_episode() { [ "$log_episode" = 1 ] && [ "$player_function" != "debug" ] && [ "$player_function" != "download" ] && command -v logger >/dev/null && logger -t ani-cli "${allanime_title}${ep_no}" - [ "$skip_intro" = 1 ] && skip_flag="$(ani-skip -q "$mal_id" -e "$ep_no")" + skip_flag="$(ani-skip -q "$mal_id" -e "$ep_no")" + skip_flag_arr=($skip_flag) + [ "$skip_intro" = 0 ] && skip_flag=${skip_flag_arr[0]} [ -z "$episode" ] && get_episode_url # shellcheck disable=SC2086 case "$player_function" in @@ -440,7 +442,6 @@ done [ "$use_external_menu" = "1" ] && multi_selection_flag="${ANI_CLI_MULTI_SELECTION:-"-multi-select"}" printf "\33[2K\r\033[1;34mChecking dependencies...\033[0m\n" dep_ch "curl" "sed" "grep" || true -[ "$skip_intro" = 1 ] && (dep_ch "ani-skip" || true) if [ -z "$ANI_CLI_NON_INTERACTIVE" ]; then dep_ch fzf || true; fi case "$player_function" in debug) ;; @@ -492,7 +493,7 @@ case "$search" in [ -z "$ep_no" ] && exit 1 ;; esac -[ "$skip_intro" = 1 ] && mal_id="$(ani-skip -q "${skip_title:-${title}}")" +(dep_ch "ani-skip" || true) && mal_id="$(ani-skip -q "${skip_title:-${title}}")" # moves the cursor up one line and clears that line tput cuu1 && tput el