Skip to content

Commit d9fffbf

Browse files
committed
feat: fetch chapter information regardless of --skip argument
1 parent 2595908 commit d9fffbf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

ani-cli

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/sh
22

3-
version_number="4.9.6"
3+
version_number="4.9.7"
44

55
# UI
66

@@ -274,7 +274,9 @@ download() {
274274

275275
play_episode() {
276276
[ "$log_episode" = 1 ] && [ "$player_function" != "debug" ] && [ "$player_function" != "download" ] && command -v logger >/dev/null && logger -t ani-cli "${allanime_title}${ep_no}"
277-
[ "$skip_intro" = 1 ] && skip_flag="$(ani-skip -q "$mal_id" -e "$ep_no")"
277+
skip_flag="$(ani-skip -q "$mal_id" -e "$ep_no")"
278+
skip_flag_arr=($skip_flag)
279+
[ "$skip_intro" = 0 ] && skip_flag=${skip_flag_arr[0]}
278280
[ -z "$episode" ] && get_episode_url
279281
# shellcheck disable=SC2086
280282
case "$player_function" in
@@ -440,7 +442,6 @@ done
440442
[ "$use_external_menu" = "1" ] && multi_selection_flag="${ANI_CLI_MULTI_SELECTION:-"-multi-select"}"
441443
printf "\33[2K\r\033[1;34mChecking dependencies...\033[0m\n"
442444
dep_ch "curl" "sed" "grep" || true
443-
[ "$skip_intro" = 1 ] && (dep_ch "ani-skip" || true)
444445
if [ -z "$ANI_CLI_NON_INTERACTIVE" ]; then dep_ch fzf || true; fi
445446
case "$player_function" in
446447
debug) ;;
@@ -492,7 +493,7 @@ case "$search" in
492493
[ -z "$ep_no" ] && exit 1
493494
;;
494495
esac
495-
[ "$skip_intro" = 1 ] && mal_id="$(ani-skip -q "${skip_title:-${title}}")"
496+
(dep_ch "ani-skip" || true) && mal_id="$(ani-skip -q "${skip_title:-${title}}")"
496497

497498
# moves the cursor up one line and clears that line
498499
tput cuu1 && tput el

0 commit comments

Comments
 (0)