[Feature Request] Batch download endpoint
What feature should be added to Tachidesk?
Batch download endpoint to request downloading for multiple manga in a single request
Why/Project's Benefit/Existing Problem
Until this gets implemented, here's a really quick BASH script that can do the job for now :)
# Variables
BASE="http://localhost:4567"; ID="26"; FROM="1"; TO="236"
# Make cURL go brrrrr
for i in $( seq $FROM $TO ); do
curl -s "$BASE/api/v1/download/$ID/chapter/$i" \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Connection: keep-alive' \
-H "Referer: $BASE/manga/$ID" \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin'
echo "[Download requested] $BASE/manga/$ID -> Chapter $i"
done
I'm just too lazy to click "Download" button for every chapter!

Same bash script as above but with prompts and minimal error checking.
# Variables
BASE="http://localhost:4567";
#ID="26"; FROM="1"; TO="236"
# Prompt
echo ENTER ID for Manga
read ID
echo ENTER Lowest Chapter Number to Download
read FROM
echo ENTER Largest Chapter Number to Download
read TO
#Error Check
################################################
if [ -z "$ID" ] || [ -z "$FROM" ] || [ -z "$TO" ]
then
echo -e "\e[1;31;1;40mError: Input cannot be blank.\e[0m"
sleep 5
exit 0
fi
################################################
if [[ $((ID)) != $ID ]] || [[ $((FROM)) != $FROM ]] || [[ $((TO)) != $TO ]]
then
echo -e "\e[1;31;1;40mError: Input must be a number\e[0m"
sleep 5
exit 0
fi
################################################
# Make cURL go brrrrr
for i in $( seq $FROM $TO ); do
curl -s "$BASE/api/v1/download/$ID/chapter/$i" \
-H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/101.0.4951.67 Safari/537.36' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Accept-Language: en-US,en;q=0.5' \
-H 'Accept-Encoding: gzip, deflate, br' \
-H 'Connection: keep-alive' \
-H "Referer: $BASE/manga/$ID" \
-H 'Sec-Fetch-Dest: empty' \
-H 'Sec-Fetch-Mode: cors' \
-H 'Sec-Fetch-Site: same-origin'
echo "[Download requested] $BASE/manga/$ID -> Chapter $i"
done
what is bash script how can i do it
Considering how there was no commit mentioned in this issue and the fact that I can't find the batch download button anywhere.
Is the fix supposed to be the bash script?
Considering how there was no commit mentioned in this issue and the fact that I can't find the batch download button anywhere.
Is the fix supposed to be the bash script?
The initial change was in #436
The feature will be available in the next stable release soon.