From 39e3bae63452875dd35b90ad556f913f84ee8ec9 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 06:08:20 +0530 Subject: [PATCH 01/12] refactor: readd the wix-provider --- ani-cli | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/ani-cli b/ani-cli index d00427b08..78d37af46 100755 --- a/ani-cli +++ b/ani-cli @@ -130,6 +130,13 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in + *repackager.wixmp.com*) + extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') + for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ +|g'); do + printf "%s >%s\n" "$j" "$extract_link" | sed "s|,[^/]*|${j}|g" + done | sort -nr + ;; *vipanicdn* | *anifastcdn*) if printf "%s" "$episode_link" | head -1 | grep -q "original.m3u"; then printf "%s" "$episode_link" @@ -155,9 +162,10 @@ provider_init() { # generates links based on given provider generate_link() { case $1 in - 1) provider_init "dropbox" "/Sak :/p" ;; # dropbox(mp4)(single) - 2) provider_init "wetransfer" "/Kir :/p" ;; # wetransfer(mp4)(single) - 3) provider_init "sharepoint" "/S-mp4 :/p" ;; # sharepoint(mp4)(single) + 1) provider_init "wixmp" "/Default :/p" ;; # wixmp(default)(m3u8)(multi) -> (mp4)(multi) + 2) provider_init "dropbox" "/Sak :/p" ;; # dropbox(mp4)(single) + 3) provider_init "wetransfer" "/Kir :/p" ;; # wetransfer(mp4)(single) + 4) provider_init "sharepoint" "/S-mp4 :/p" ;; # sharepoint(mp4)(single) *) provider_init "gogoanime" "/Luf-mp4 :/p" ;; # gogoanime(m3u8)(multi) esac [ -n "$provider_id" ] && get_links "$provider_id" From 7b2caf4f7a0a13db46e0240a3b5f9cc056592321 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 07:58:27 +0530 Subject: [PATCH 02/12] refactor: allanime url update --- ani-cli | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ani-cli b/ani-cli index 78d37af46..566e83bf4 100755 --- a/ani-cli +++ b/ani-cli @@ -147,6 +147,7 @@ get_links() { | >|' | sed "s|>|>${relative_link}|g" | sort -nr fi ;; + *) [ -n "$episode_link" ] && printf "%s\n" "$episode_link" ;; esac [ -z "$ANI_CLI_NON_INTERACTIVE" ] && printf "\033[1;32m%s\033[0m Links Fetched\n" "$provider_name" 1>&2 @@ -189,7 +190,7 @@ get_episode_url() { resp=$(curl -e "$allanime_refr" -s -G "${allanime_api}/api" --data-urlencode "variables={\"showId\":\"$id\",\"translationType\":\"$mode\",\"episodeString\":\"$ep_no\"}" --data-urlencode "query=$episode_embed_gql" -A "$agent" | tr '{}' '\n' | sed 's|\\u002F|\/|g;s|\\||g' | sed -nE 's|.*sourceUrl":"--([^"]*)".*sourceName":"([^"]*)".*|\2 :\1|p') # generate links into sequential files cache_dir="$(mktemp -d)" - providers="1 2 3 4" + providers="1 2 3 4 5" for provider in $providers; do generate_link "$provider" >"$cache_dir"/"$provider" & done @@ -333,9 +334,9 @@ play() { # setup agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/121.0" -allanime_refr="https://allanime.to" +allanime_refr="https://allmanga.to" allanime_base="allanime.day" -allanime_api="https://api.${allanime_base}" +allanime_api="https://api.${allanime_base}" #api is down apparently mode="${ANI_CLI_MODE:-sub}" download_dir="${ANI_CLI_DOWNLOAD_DIR:-.}" log_episode="${ANI_CLI_LOG:-1}" From 52dec6c270a67ee178dc963837ad017178b60973 Mon Sep 17 00:00:00 2001 From: Skyler <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:07:42 +0530 Subject: [PATCH 03/12] remove excess whitespaces Co-authored-by: port19 --- ani-cli | 1 - 1 file changed, 1 deletion(-) diff --git a/ani-cli b/ani-cli index 566e83bf4..c145193a6 100755 --- a/ani-cli +++ b/ani-cli @@ -147,7 +147,6 @@ get_links() { | >|' | sed "s|>|>${relative_link}|g" | sort -nr fi ;; - *) [ -n "$episode_link" ] && printf "%s\n" "$episode_link" ;; esac [ -z "$ANI_CLI_NON_INTERACTIVE" ] && printf "\033[1;32m%s\033[0m Links Fetched\n" "$provider_name" 1>&2 From 75fce248a4c4d6a587f0298734dd5affff83f168 Mon Sep 17 00:00:00 2001 From: Skyler <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:08:08 +0530 Subject: [PATCH 04/12] prettify: removing more excess whitespaces Co-authored-by: port19 --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index c145193a6..6d2ac44a9 100755 --- a/ani-cli +++ b/ani-cli @@ -130,7 +130,7 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in - *repackager.wixmp.com*) + *repackager.wixmp.com*) extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ |g'); do From 7c27f80a23c9ed46c885572c6bdc1a63f0719a0a Mon Sep 17 00:00:00 2001 From: Skyler <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:09:04 +0530 Subject: [PATCH 05/12] prettify: removing whitespaces #3 Co-authored-by: port19 --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 6d2ac44a9..3e1c9e6b2 100755 --- a/ani-cli +++ b/ani-cli @@ -162,7 +162,7 @@ provider_init() { # generates links based on given provider generate_link() { case $1 in - 1) provider_init "wixmp" "/Default :/p" ;; # wixmp(default)(m3u8)(multi) -> (mp4)(multi) + 1) provider_init "wixmp" "/Default :/p" ;; # wixmp(default)(m3u8)(multi) -> (mp4)(multi) 2) provider_init "dropbox" "/Sak :/p" ;; # dropbox(mp4)(single) 3) provider_init "wetransfer" "/Kir :/p" ;; # wetransfer(mp4)(single) 4) provider_init "sharepoint" "/S-mp4 :/p" ;; # sharepoint(mp4)(single) From a393d73783fe081159aacc216383ed6ee7561ad6 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:12:29 +0530 Subject: [PATCH 06/12] prettify: remove useless comment --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 3e1c9e6b2..2731a204d 100755 --- a/ani-cli +++ b/ani-cli @@ -335,7 +335,7 @@ play() { agent="Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/121.0" allanime_refr="https://allmanga.to" allanime_base="allanime.day" -allanime_api="https://api.${allanime_base}" #api is down apparently +allanime_api="https://api.${allanime_base}" mode="${ANI_CLI_MODE:-sub}" download_dir="${ANI_CLI_DOWNLOAD_DIR:-.}" log_episode="${ANI_CLI_LOG:-1}" From 7aaf980e113dfd42d4d064380efd3d1e7cd04516 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:14:45 +0530 Subject: [PATCH 07/12] version bump --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 2731a204d..953acba79 100755 --- a/ani-cli +++ b/ani-cli @@ -1,6 +1,6 @@ #!/bin/sh -version_number="4.9.0" +version_number="4.9.1" # UI From d6036f2b6d35517437454787eca416afb60f97a8 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:17:25 +0530 Subject: [PATCH 08/12] prettify: remove useless indent --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 953acba79..a01ae3083 100755 --- a/ani-cli +++ b/ani-cli @@ -130,7 +130,7 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in - *repackager.wixmp.com*) + *repackager.wixmp.com*) extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ |g'); do From 98e2cdcc035a9d044a579233893a59d686095eaa Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:19:22 +0530 Subject: [PATCH 09/12] fix: removed too many indents --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index a01ae3083..39d1a7147 100755 --- a/ani-cli +++ b/ani-cli @@ -130,7 +130,7 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in - *repackager.wixmp.com*) + *repackager.wixmp.com*) extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ |g'); do From 2a0b69b2d4bb373fd4603e94697184d6ed1851fa Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:21:47 +0530 Subject: [PATCH 10/12] fix: the indentation issue for the last time --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 39d1a7147..a01ae3083 100755 --- a/ani-cli +++ b/ani-cli @@ -130,7 +130,7 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in - *repackager.wixmp.com*) + *repackager.wixmp.com*) extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ |g'); do From a224efd21afa31f489c60b7fde74969df698f8e2 Mon Sep 17 00:00:00 2001 From: sarvasv-0 <81177923+Sarvasv-0@users.noreply.github.com> Date: Sun, 22 Sep 2024 13:08:47 +0530 Subject: [PATCH 11/12] refactor: use shfmt to reformat --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index a01ae3083..9c7e3b16d 100755 --- a/ani-cli +++ b/ani-cli @@ -130,7 +130,7 @@ get_links() { |g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\2 >\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p')" case "$episode_link" in - *repackager.wixmp.com*) + *repackager.wixmp.com*) extract_link=$(printf "%s" "$episode_link" | cut -d'>' -f2 | sed 's|repackager.wixmp.com/||g;s|\.urlset.*||g') for j in $(printf "%s" "$episode_link" | sed -nE 's|.*/,([^/]*),/mp4.*|\1|p' | sed 's|,|\ |g'); do From 772e25f7272e942bcabd48eb918f970f45777807 Mon Sep 17 00:00:00 2001 From: port19 Date: Sun, 22 Sep 2024 09:43:34 +0200 Subject: [PATCH 12/12] version bump --- ani-cli | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ani-cli b/ani-cli index 9c7e3b16d..f1154a27b 100755 --- a/ani-cli +++ b/ani-cli @@ -1,6 +1,6 @@ #!/bin/sh -version_number="4.9.1" +version_number="4.9.3" # UI