diff --git a/ani-cli b/ani-cli index 4d59379c..501a4407 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,8 @@ 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_intro" = 0 ] && skip_flag=$(echo "$skip_flag" | cut -d " " -f 1) [ -z "$episode" ] && get_episode_url # shellcheck disable=SC2086 case "$player_function" in @@ -440,7 +441,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 +492,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