Skip to content

Commit

Permalink
feat: fetch chapter information regardless of --skip argument
Browse files Browse the repository at this point in the history
  • Loading branch information
topazrn committed Jan 29, 2025
1 parent 2595908 commit d9fffbf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions ani-cli
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

version_number="4.9.6"
version_number="4.9.7"

# UI

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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) ;;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d9fffbf

Please sign in to comment.