From 77eaa9e4b031f56a6e7e40b326ef62b858367de0 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Thu, 5 May 2022 16:59:27 -0700 Subject: [PATCH] implement log access time fix --- ani-cli | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ani-cli b/ani-cli index e85cf40..552244b 100755 --- a/ani-cli +++ b/ani-cli @@ -196,14 +196,14 @@ get_video_link() { resp=$(curl -A "$AGENT" -s "$1") if [ "$is_download" -eq 1 ]; then i=1 - [ "$quality" != "best" ] && i=3 else - i=4 + i=2 fi + [ "$quality" != "best" ] && i=3 links=$(printf "%s" "$resp" | sed -nE 's/.*data-status="1".*data-video="(.*)">.*/\1/p') while [ "$i" -ge 1 ] && [ "$i" -le 4 ] && [ -z "$result_links" ]; do generate_link "$i" - [ "$is_download" -eq 1 ] && i=$((i + 1)) || i=$((i - 1)) + i=$((i + 1)) done video_links="$result_links" unset result_links