# 2025.02.18 - [uploadhive] Add handling of the new /cgi-bin/dl.cgi/ url tickets (WIP)
# (unfortunately, this is tied to the requesting ip, so downloads get "Wrong IP") # 2025.02.18 - [up_oshi] Add Manage url as comment on uploads # 2025.02.18 - [up_oshi / oshi] use /nossl/ url and http # 2025.02.17 - [gofile] Add a random sleep if 429 response detected (too many requests) # 2025.02.17 - [*ALL] Audit and update all single bracket operations # 2025.02.17 - [filehaus] Fix downloading from fh # 2025.02.15 - [uploadbay] Update urls regex for acceptable alternate # 2025.02.15 - [up_sendnow] Add send.now as upload host # 2025.02.15 - [sendnow] Fix handling of filenames with special characters in url
This commit is contained in:
parent
d48116dbe3
commit
d62376f7a8
103 changed files with 3541 additions and 3517 deletions
16
plugins/AutoResetAndRetryDownloads.sh
Executable file → Normal file
16
plugins/AutoResetAndRetryDownloads.sh
Executable file → Normal file
|
|
@ -1,6 +1,6 @@
|
|||
#! Name: AutoResetAndRetryDownloads.sh
|
||||
#! Author: kittykat
|
||||
#! Version: 2024.09.27
|
||||
#! Version: 2025.02.18
|
||||
#! Desc: Runs mad.sh reset after processing all urls and then relaunches MAD
|
||||
#! Usage: Edit LoadPlugin="" line in mad.sh or mad.config
|
||||
#! LoadPlugin="AutoResetAndRetryDownloads.sh"
|
||||
|
|
@ -30,25 +30,25 @@
|
|||
DoneProcessingAllUrls_AutoResetAndRetryDownloads() {
|
||||
local plugName='AutoResetAndRetryDownloads'
|
||||
local plugFunc='DoneProcessingAllUrls_AutoResetAndRetryDownloads'
|
||||
if [ "${DebugPluginsEnabled}" == "true" ]; then
|
||||
if [[ "${DebugPluginsEnabled}" == "true" ]]; then
|
||||
echo -e "[${PINK}DEBUG${NC}]: Running ${PINK}$plugFunc${NC} in ${BLUE}$plugName${NC} ...${NC}"
|
||||
fi
|
||||
local pInputFile="$1"
|
||||
arard_ticketactivetimeout=60
|
||||
arard_ticketexpirytimeout=540
|
||||
if [ "$LoopThroughFileUntilComplete" == "true" ] && [ ! -z $CatnapDuration ] && ((CatnapDuration > 0)); then
|
||||
if [[ "$LoopThroughFileUntilComplete" == "true" ]] && [[ ! -z $CatnapDuration ]] && ((CatnapDuration > 0)); then
|
||||
arard_ticketactivetimeout=$(( arard_ticketactivetimeout + (CatnapDuration * 60) ))
|
||||
arard_ticketexpirytimeout=$(( arard_ticketexpirytimeout + (CatnapDuration * 60) ))
|
||||
fi
|
||||
if grep -Eqi '^#(http.*#RETRY#|direct=http.*#RETRY#).*$' "$pInputFile" ; then
|
||||
if [ ! -f "${WorkDir}/.temp/AutoResetAndRetryDownloadsarard_startTime.txt" ]; then
|
||||
if [[ ! -f "${WorkDir}/.temp/AutoResetAndRetryDownloadsarard_startTime.txt" ]]; then
|
||||
echo $(date +%s) > "${WorkDir}/.temp/AutoResetAndRetryDownloadsarard_startTime.txt"
|
||||
else
|
||||
arard_startTime=$(cat "${WorkDir}/.temp/AutoResetAndRetryDownloadsarard_startTime.txt")
|
||||
arard_currTime=$(date +%s)
|
||||
arard_durationseconds=$((arard_currTime - arard_startTime))
|
||||
if ((arard_durationseconds > arard_ticketexpirytimeout)); then
|
||||
if [ "${DebugPluginsEnabled}" == "true" ]; then
|
||||
if [[ "${DebugPluginsEnabled}" == "true" ]]; then
|
||||
echo -e "[${PINK}DEBUG${NC}]: Ticket expiry occurred ($arard_durationseconds > $arard_ticketexpirytimeout)..${NC}"
|
||||
fi
|
||||
echo $(date +%s) > "${WorkDir}/.temp/AutoResetAndRetryDownloadsarard_startTime.txt"
|
||||
|
|
@ -56,7 +56,7 @@ DoneProcessingAllUrls_AutoResetAndRetryDownloads() {
|
|||
arard_currTime=$(date +%s)
|
||||
arard_durationseconds=$((arard_currTime - arard_startTime))
|
||||
elif ((arard_durationseconds > arard_ticketactivetimeout)); then
|
||||
if [ "${DebugPluginsEnabled}" == "true" ]; then
|
||||
if [[ "${DebugPluginsEnabled}" == "true" ]]; then
|
||||
echo -e "[${PINK}DEBUG${NC}]: Ticket inactive ($arard_durationseconds > $arard_ticketactivetimeout)..${NC}"
|
||||
fi
|
||||
for ((a=1; a<=2; a++)); do
|
||||
|
|
@ -67,7 +67,7 @@ DoneProcessingAllUrls_AutoResetAndRetryDownloads() {
|
|||
echo -e "${YELLOW}Reset&Retry${NC}: Done processing... ${BLUE}$((arard_durationseconds/60))${NC} min(s). Expiry ${PINK}$(( (arard_ticketexpirytimeout - arard_durationseconds)/60 ))${NC} min(s).${NC}"
|
||||
return 0
|
||||
fi
|
||||
if [ "${DebugPluginsEnabled}" == "true" ]; then
|
||||
if [[ "${DebugPluginsEnabled}" == "true" ]]; then
|
||||
echo -e "[${PINK}DEBUG${NC}]: Ticket active ($arard_durationseconds)..${NC}"
|
||||
fi
|
||||
for ((a=1; a<=2; a++)); do
|
||||
|
|
@ -78,7 +78,7 @@ DoneProcessingAllUrls_AutoResetAndRetryDownloads() {
|
|||
echo -e "${YELLOW}Reset&Retry${NC}: Dozing ${BLUE}1${NC} min. Processing for ${BLUE}$((arard_durationseconds/60))${NC} of ${BLUE}$((arard_ticketactivetimeout/60))${NC} min(s)${NC}. Expiry ${PINK}$(( (arard_ticketexpirytimeout - arard_durationseconds)/60 ))${NC} min(s).${NC}"
|
||||
sleep 1m
|
||||
fi
|
||||
if [ ! -f "${WorkDir}/.temp/AutoResetAndRetryDownloadsCnt.lk" ]; then
|
||||
if [[ ! -f "${WorkDir}/.temp/AutoResetAndRetryDownloadsCnt.lk" ]]; then
|
||||
touch "${WorkDir}/.temp/AutoResetAndRetryDownloadsCnt.lk"
|
||||
trap "rm -f ${WorkDir}/.temp/AutoResetAndRetryDownloadsCnt.lk; echo ""; tput cnorm; exit" 0 1 2 3 6 15
|
||||
madReset "$pInputFile" "true" "false" "false" "true"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue