This Is Why We Don't Push To Production On Fridays
This commit is contained in:
36
grpoppro
36
grpoppro
@@ -7,6 +7,7 @@ GRPOPPRO_PLAYLIST_FILE="$GRPOPPRO_DATA_DIR/lastPlaylistPlayed"
|
|||||||
GRPOPPRO_COOKIE_FILE="$GRPOPPRO_DATA_DIR/cookies.txt"
|
GRPOPPRO_COOKIE_FILE="$GRPOPPRO_DATA_DIR/cookies.txt"
|
||||||
GRPOPPRO_HISTORY_FILE="$GRPOPPRO_DATA_DIR/history"
|
GRPOPPRO_HISTORY_FILE="$GRPOPPRO_DATA_DIR/history"
|
||||||
INTERACTIVE="on"
|
INTERACTIVE="on"
|
||||||
|
DEBUG="on"
|
||||||
menu="fuzzel -d -p "
|
menu="fuzzel -d -p "
|
||||||
#menu="fzf -i --prompt="
|
#menu="fzf -i --prompt="
|
||||||
apiurl="https://coverapi.store"
|
apiurl="https://coverapi.store"
|
||||||
@@ -66,21 +67,29 @@ function curlRequest {
|
|||||||
# Dynamically shift the total number of times needed
|
# Dynamically shift the total number of times needed
|
||||||
shift $((shifts - 1))
|
shift $((shifts - 1))
|
||||||
|
|
||||||
# response="$(curl -s -L \
|
if [[ "$DEBUG" == "off" ]]; then
|
||||||
# -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" \
|
|
||||||
# "$@"
|
|
||||||
# )"
|
|
||||||
|
|
||||||
|
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"
|
LOG_FILE="/tmp/grpoppro_curl_commands.log"
|
||||||
|
else
|
||||||
|
LOG_FILE="$GRPOPPRO_DATA_DIR/grpoppro_curl_commands.log"
|
||||||
|
fi
|
||||||
|
|
||||||
local curl_command=(
|
local curl_command=(
|
||||||
"curl"
|
"curl"
|
||||||
@@ -124,6 +133,7 @@ function curlRequest {
|
|||||||
} >> "$LOG_FILE"
|
} >> "$LOG_FILE"
|
||||||
|
|
||||||
response=$("${curl_command[@]}")
|
response=$("${curl_command[@]}")
|
||||||
|
fi
|
||||||
|
|
||||||
exit_code="$?"
|
exit_code="$?"
|
||||||
if [[ "$exit_code" -ne 0 ]]; then
|
if [[ "$exit_code" -ne 0 ]]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user