add ATFBooru support

This commit is contained in:
2024-09-27 16:33:15 +02:00
parent 969877cdb0
commit 1e5b09db38
2 changed files with 22 additions and 4 deletions

View File

@ -17,8 +17,14 @@ setup_test() {
}
download() {
[[ -f downloaded_$1.txt ]] || echo -e "${IYELLOW}download_$1.txt doesn't exist${NO_COLOR}" || exit 1
cp downloaded_$1.txt to_download_$1.txt
input_file="$1.links"
if [[ ! -f $input_file ]]; then
echo -e "${IYELLOW}$input_file doesn't exist${NO_COLOR}"
exit 1
fi
cp $input_file to_download_$1.txt
for ((n=0;n<5;n++)); do
gallery-dl --config ./gallery-dl/config.json --input-file-delete to_download_$1.txt
@ -37,7 +43,7 @@ download() {
echo -e "${IGREEN}has internet${NO_COLOR}"
done
[[ $(hostname) != \s\a\t\a\n ]] && cp ./gallery-dl/archive-$1.sqlite3 /data/backup
[[ $(hostname) != \s\a\t\a\n ]] && cp ./gallery-dl/archive-${$1,,}.sqlite3 /data/backup
if [ -s to_download_$1.txt ]; then
exit 1
@ -47,4 +53,4 @@ download() {
}
[[ $(hostname) == \s\a\t\a\n ]] && setup_test
download $1
download $1