From 3afcabf199c8dad22d6eee96595415aa7b2f489c Mon Sep 17 00:00:00 2001 From: Kevin Cui Date: Fri, 7 Oct 2022 20:28:28 +0200 Subject: [PATCH] Revert "Revert some changes" This reverts commit 066c4e74bb9dd427aca5656ede66a83125bfde60. --- animepahe-dl.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/animepahe-dl.sh b/animepahe-dl.sh index 915cc78..54e0543 100755 --- a/animepahe-dl.sh +++ b/animepahe-dl.sh @@ -167,9 +167,8 @@ download_source() { get_episode_link() { # $1: episode number local i s d r="" - i=$("$_JQ" -r '.data[] | select((.episode | tonumber) == ($num | tonumber)) | .anime_id' --arg num "$1" < "$_SCRIPT_PATH/$_ANIME_NAME/$_SOURCE_FILE") s=$("$_JQ" -r '.data[] | select((.episode | tonumber) == ($num | tonumber)) | .session' --arg num "$1" < "$_SCRIPT_PATH/$_ANIME_NAME/$_SOURCE_FILE") - [[ "$i" == "" ]] && print_warn "Episode $1 not found!" && return + [[ "$s" == "" ]] && print_warn "Episode $1 not found!" && return d="$(get "${_API_URL}?m=links&id=${s}&p=kwik" | "$_JQ" -r '.data[]')" if [[ -n "${_ANIME_AUDIO:-}" ]]; then