Removed code.

This commit is contained in:
2024-12-31 22:26:50 +02:00
parent 8e3fde91c5
commit 28189cb33c

View File

@@ -19,7 +19,6 @@ CONNECTION="Connection: keep-alive"
UP_IN_REQ="Upgrade-Insecure-Requests: 1" UP_IN_REQ="Upgrade-Insecure-Requests: 1"
### End of curl constants ### End of curl constants
player="mpv" player="mpv"
# --no-load-scripts \
MPV_OPTS='--vo=gpu \ MPV_OPTS='--vo=gpu \
--gpu-api=opengl \ --gpu-api=opengl \
--opengl-es=yes \ --opengl-es=yes \
@@ -109,24 +108,11 @@ function curlRequest {
) )
# "-H $UP_IN_REQ" # "-H $UP_IN_REQ"
# log_string=$(printf "curl -s -L \n -c %s \n -b %s \n %s \n --compressed \n -X %s \n -A %s \n -H %s \n -H %s \n -H %s \n -H %s \n %s \n" \
# "$GRPOPPRO_COOKIE_FILE" \
# "$GRPOPPRO_COOKIE_FILE" \
# "$url" \
# "$custom_method" \
# "$USER_AGENT" \
# "$custom_accept" \
# "$ACCEPT_LANGUAGE" \
# "$CONNECTION" \
# "$UP_IN_REQ" \
# "$@")
{ {
echo -e "<===========================\n" echo -e "<===========================\n"
echo "Called by: ${FUNCNAME[1]}" echo "Called by: ${FUNCNAME[1]}"
echo "" echo ""
echo -e "$(date '+%d-%m-%Y %H:%M:%S') -> ${curl_command[5]}\n" echo -e "$(date '+%d-%m-%Y %H:%M:%S') -> ${curl_command[5]}\n"
# echo -e "$log_string"
printf "%s\n" "${curl_command[@]}" printf "%s\n" "${curl_command[@]}"
echo "" echo ""
echo -e "===========================>\n" echo -e "===========================>\n"
@@ -244,7 +230,7 @@ function play {
player="mpv --save-position-on-quit ${MPV_OPTS}" player="mpv --save-position-on-quit ${MPV_OPTS}"
fi fi
[[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}" [[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}"
# No setsid -f here because menu function goes from play to resume # No setsid -f here because we need to wait for mpv to finish
eval "$player" "$streamurl" eval "$player" "$streamurl"
} }
@@ -405,7 +391,7 @@ function resumeUnfinishedEpisode {
player="mpv --resume-playback ${MPV_OPTS}" player="mpv --resume-playback ${MPV_OPTS}"
fi fi
[[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}" [[ "$OSTYPE" != "linux-gnu" ]] && INTERACTIVE="off" && streamurl="${streamurl//https/http}"
# No setsid -f here because menu function goes from play to resume # No setsid -f here because we need to wait for mpv to finish
eval "$player" "$streamurl" eval "$player" "$streamurl"
resume resume
} }
@@ -446,7 +432,7 @@ fi
# One arguement and it contains the imdb id # One arguement and it contains the imdb id
# Two requests to the api # Two requests to the api
if [[ "$1" == *"tt"* ]] && [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--select" ]]; then if [[ "$1" == *"tt"* ]] && [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]]; then
simpleurl="$1" simpleurl="$1"
getInternalID "$simpleurl" getInternalID "$simpleurl"
getMovieStreamUrl "$internalid" getMovieStreamUrl "$internalid"
@@ -474,7 +460,7 @@ if [[ "$#" -eq 3 ]]; then
fi fi
# Movies URL # Movies URL
if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--select" ]]; then if [[ "$#" -eq 1 ]] && [[ "$1" != "--menu" ]] && [[ "$1" != "--resume" ]] && [[ "$1" != "--finish" ]] && [[ "$1" != "--select" ]]; then
# Two requests to the api # Two requests to the api
basics "$1" # Gets the title, performs one request to imdb and gets the complete url basics "$1" # Gets the title, performs one request to imdb and gets the complete url
getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist getInternalID "$simpleurl" # Gets the complete url and performs one request to get the internal id or inform us it does not exist