Fixed everything.

This commit is contained in:
coolnsx
2025-05-27 11:24:28 +05:30
parent 4346bf79bc
commit 53fa908dd3
2 changed files with 6 additions and 3 deletions

View File

@@ -49,5 +49,5 @@ player_droid() {
} }
player_linux() { player_linux() {
setsid -f mpv "$1" --force-media-title="$2" $3 setsid -f mpv "$1" --force-media-title="$2" $@
} }

View File

@@ -60,7 +60,10 @@ printf "%s\n" "$url" | while read -r id title; do
else else
response=$(curl -s "https://${domain}${provider_id}") response=$(curl -s "https://${domain}${provider_id}")
provider_video=$(printf '%s' "$response" | sed 's|},{|\n|g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p' | head -1) provider_video=$(printf '%s' "$response" | sed 's|},{|\n|g' | sed -nE 's|.*link":"([^"]*)".*"resolutionStr":"([^"]*)".*|\1|p;s|.*hls","url":"([^"]*)".*"hardsub_lang":"en-US".*|\1|p' | head -1)
[ "$provider_name" = "hianime" ] && subtitle=$(printf '%s' "$response" | sed -nE 's|.*"subtitles":\[\{"lang":"en","label":"English","default":"default","src":"([^"]*)".*|\1|p') if [ "$provider_name" = "hianime" ]; then
subtitle=$(printf '%s' "$response" | sed -nE 's|.*"subtitles":\[\{"lang":"en","label":"English","default":"default","src":"([^"]*)".*|\1|p')
domain=$(printf '%s' "$response" | sed -nE 's|.*"Referer":"https://([^"]*)",.*|\1|p')
fi
fi fi
[ -z "$provider_video" ] && continue [ -z "$provider_video" ] && continue
[ -n "$debug" ] && printf "\033[1;32m %s\033[0m : %s\n" "$provider_name" "$provider_video" && continue [ -n "$debug" ] && printf "\033[1;32m %s\033[0m : %s\n" "$provider_name" "$provider_video" && continue
@@ -70,7 +73,7 @@ printf "%s\n" "$url" | while read -r id title; do
case $choice in case $choice in
stream) stream)
info_$os "opening $title" "mpv" info_$os "opening $title" "mpv"
player_$os "$provider_video" "$title" "--referrer='https://$domain' --sub-file='$subtitle'" player_$os "$provider_video" "$title" --referrer="https://$domain" --sub-file="$subtitle"
break break
;; ;;
cast) cast)