Skip to content

Commit

Permalink
Update to Latest API
Browse files Browse the repository at this point in the history
  • Loading branch information
lord8266 committed Oct 7, 2022
1 parent f09f438 commit 87cf4ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions animepahe-dl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -167,10 +167,9 @@ 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
d="$(get "${_API_URL}?m=embed&id=${i}&session=${s}&p=kwik" | "$_JQ" -r '.data[]')"
[[ "$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
print_info "Select audio language: $_ANIME_AUDIO"
Expand Down

0 comments on commit 87cf4ef

Please sign in to comment.