Compare commits

..

No commits in common. "924b0eed76778bc8a51847cec89e2ad0563200f7" and "e851b922896804dcd4317151e264286544cac45e" have entirely different histories.

3 changed files with 1116 additions and 1115 deletions

11
ani-cli
View File

@ -83,10 +83,11 @@ get_dpage_link() {
ep_no=$2 ep_no=$2
# credits to fork: https://github.com/Dink4n/ani-cli for the fix # credits to fork: https://github.com/Dink4n/ani-cli for the fix
for params in "-episode-$ep_no" "-$ep_no" "-episode-$ep_no-1" "-camrip-episode-$ep_no"; do anime_page=$(curl -s "$BASE_URL/$anime_id-$ep_no")
anime_page=$(curl -s "$BASE_URL/$anime_id$params")
printf '%s' "$anime_page" | grep -q '404' || break if printf '%s' "$anime_page" | grep -q "404"; then
done anime_page=$(curl -s "$BASE_URL/$anime_id-episode-$ep_no")
fi
printf '%s' "$anime_page" | printf '%s' "$anime_page" |
sed -n -E 's/^[[:space:]]*<a href="#" rel="100" data-video="([^"]*)".*/\1/p' | sed -n -E 's/^[[:space:]]*<a href="#" rel="100" data-video="([^"]*)".*/\1/p' |
@ -617,7 +618,7 @@ open_episode() {
fi fi
# Don't update watch history if downloading episode # Don't update watch history if downloading episode
insert_history "watch" "$anime_id" "$episode" (("$is_download" == 0)) && insert_history "watch" "$anime_id" "$episode"
lg "Getting data for episode $episode" lg "Getting data for episode $episode"
dpage_link=$(get_dpage_link "$anime_id" "$episode") dpage_link=$(get_dpage_link "$anime_id" "$episode")