From 06d3ad3ff2bd9bfd9e13b985852c99f46507d913 Mon Sep 17 00:00:00 2001 From: ksyasuda Date: Fri, 21 Oct 2022 22:46:12 -0700 Subject: [PATCH] update provider ordering --- ani-cli | 18 +++++++++--------- aniwrapper | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/ani-cli b/ani-cli index 2d6f560..e2cee8e 100755 --- a/ani-cli +++ b/ani-cli @@ -88,15 +88,6 @@ download() { generate_link() { case $1 in 1) - provider_name='Xstreamcdn' - progress "Fetching $provider_name links.." - fb_id=$(printf "%s" "$resp" | sed -n "s_.*fembed.*/v/__p") - refr="https://fembed-hd.com/v/$fb_id" - [ -z "$fb_id" ] && return 0 - result_links="$(curl -A "$AGENT" -s -X POST "https://fembed-hd.com/api/source/$fb_id" -H "x-requested-with:XMLHttpRequest" | - sed -e 's/\\//g' -e 's/.*data"://' | tr "}" "\n" | sed -nE 's/.*file":"(.*)","label":"(.*)","type.*/\2>\1/p')" - ;; - 2) provider_name='Animixplay' progress "Fetching $provider_name Direct link.." refr="$BASE_URL" @@ -105,6 +96,15 @@ generate_link() { ani_id=$(printf "%sLTXs3GrU8we9O%s" "$id" "$enc_id" | base64) result_links="$(curl -s "$BASE_URL/api/live${ani_id}" -A "$AGENT" -I | sed -nE 's_location: (.*)_\1_p' | cut -d"#" -f2 | base64 -d)" ;; + 2) + provider_name='Xstreamcdn' + progress "Fetching $provider_name links.." + fb_id=$(printf "%s" "$resp" | sed -n "s_.*fembed.*/v/__p") + refr="https://fembed-hd.com/v/$fb_id" + [ -z "$fb_id" ] && return 0 + result_links="$(curl -A "$AGENT" -s -X POST "https://fembed-hd.com/api/source/$fb_id" -H "x-requested-with:XMLHttpRequest" | + sed -e 's/\\//g' -e 's/.*data"://' | tr "}" "\n" | sed -nE 's/.*file":"(.*)","label":"(.*)","type.*/\2>\1/p')" + ;; *) provider_name='Gogoanime' progress "Fetching $provider_name Direct link.." diff --git a/aniwrapper b/aniwrapper index 95ffa6e..56e67f4 100755 --- a/aniwrapper +++ b/aniwrapper @@ -263,7 +263,7 @@ get_player() { # prompts the user to select a provider and returns the provider name and index get_provider() { - providers="1. Xstreamcdn|2. Animixplay|3. Gogoanime" + providers="1. Animixplay|2. Xstreamcdn|3. Gogoanime" if ((IS_ROFI)); then selection="$(rofi -dmenu -config "$CFG_FILE" -DPI "$DPI" \ -i -l 7 -theme-str 'listview {columns: 1;} window {width: 45%;}' \