This Is Why We Don't Push To Production On Fridays

This commit is contained in:
2024-12-31 19:54:37 +02:00
parent 721ee73606
commit 8e3fde91c5

View File

@@ -7,6 +7,7 @@ GRPOPPRO_PLAYLIST_FILE="$GRPOPPRO_DATA_DIR/lastPlaylistPlayed"
GRPOPPRO_COOKIE_FILE="$GRPOPPRO_DATA_DIR/cookies.txt"
GRPOPPRO_HISTORY_FILE="$GRPOPPRO_DATA_DIR/history"
INTERACTIVE="on"
DEBUG="on"
menu="fuzzel -d -p "
#menu="fzf -i --prompt="
apiurl="https://coverapi.store"
@@ -66,21 +67,29 @@ function curlRequest {
# Dynamically shift the total number of times needed
shift $((shifts - 1))
# response="$(curl -s -L \
# -c "$GRPOPPRO_COOKIE_FILE" \
# -b "$GRPOPPRO_COOKIE_FILE" \
# "$url" \
# --compressed \
# -X "$custom_method" \
# -A "$USER_AGENT" \
# -H "$custom_accept" \
# -H "$ACCEPT_LANGUAGE" \
# -H "$CONNECTION" \
# -H "$UP_IN_REQ" \
# "$@"
# )"
if [[ "$DEBUG" == "off" ]]; then
response="$(curl -s -L \
-c "$GRPOPPRO_COOKIE_FILE" \
-b "$GRPOPPRO_COOKIE_FILE" \
"$url" \
--compressed \
-X "$custom_method" \
-A "$USER_AGENT" \
-H "$custom_accept" \
-H "$ACCEPT_LANGUAGE" \
-H "$CONNECTION" \
-H "$UP_IN_REQ" \
"$@"
)"
else
if [[ "$OSTYPE" == "linux-gnu" ]]; then
LOG_FILE="/tmp/grpoppro_curl_commands.log"
else
LOG_FILE="$GRPOPPRO_DATA_DIR/grpoppro_curl_commands.log"
fi
local curl_command=(
"curl"
@@ -124,6 +133,7 @@ function curlRequest {
} >> "$LOG_FILE"
response=$("${curl_command[@]}")
fi
exit_code="$?"
if [[ "$exit_code" -ne 0 ]]; then