From acdf8e9f905fe3f5a6aa305dbe6e8c3085c0c091 Mon Sep 17 00:00:00 2001 From: AustrianToast Date: Tue, 9 Jul 2024 20:46:40 +0200 Subject: [PATCH] small change --- gallery-dl/gallery-dl.sh | 29 +++++++++-------------------- gallery-dl/gallery-dl/config.json | 2 +- gallery-dl/to_download_kemono.txt | 1 + 3 files changed, 11 insertions(+), 21 deletions(-) create mode 100644 gallery-dl/to_download_kemono.txt diff --git a/gallery-dl/gallery-dl.sh b/gallery-dl/gallery-dl.sh index 92b78af..546d5d9 100755 --- a/gallery-dl/gallery-dl.sh +++ b/gallery-dl/gallery-dl.sh @@ -10,18 +10,21 @@ setup_test() { } download() { + [[ -f downloaded_$1.txt ]] || echo -e "${IYELLOW}download_$1: no file to download from${NO_COLOR}" || exit 1 + cp downloaded_$1.txt to_download_$1.txt + while [ 1 ] do - gallery-dl --config ./gallery-dl/config.json --input-file-delete $1 + gallery-dl --config ./gallery-dl/config.json --input-file-delete to_download_$1.txt - if [ ! -s $1 ]; then + if [ ! -s to_download_$1.txt ]; then echo -e "${IGREEN}file empty${NO_COLOR}" - rm $1 + rm to_download_$1.txt break fi echo -e "${IYELLOW}file not empty${NO_COLOR}" - if [ $(ping -qc 3 matrix.hopeless-cloud.xyz > /dev/null 2>&1) ]; then + if [ $(ping -qc 3 hopeless-cloud.xyz > /dev/null 2>&1) ]; then echo -e "${IYELLOW}no internet${NO_COLOR}" exit 1 fi @@ -29,20 +32,6 @@ download() { done } -download_r34() { - [[ -f downloaded_r34.txt ]] || echo -e "${IYELLOW}download_r34: no file to download from${NO_COLOR}" || exit 1 - cp downloaded_r34.txt to_download_r34.txt - - download to_download_r34.txt -} - -download_kemono() { - [[ -f downloaded_kemono.txt ]] || echo -e "${IYELLOW}download_kemono: no file to download from${NO_COLOR}" || exit 1 - cp downloaded_kemono.txt to_download_kemono.txt - - download to_download_kemono.txt -} - setup_test -download_r34 -download_kemono +download r34 +download kemono diff --git a/gallery-dl/gallery-dl/config.json b/gallery-dl/gallery-dl/config.json index 336624b..16fa210 100644 --- a/gallery-dl/gallery-dl/config.json +++ b/gallery-dl/gallery-dl/config.json @@ -15,7 +15,7 @@ { "archive": "./gallery-dl/archive-kemono.sqlite3", - "filename": "{id}_{num:>03}.{extension}", + "filename": "{hash}.{extension}", "directory": ["{user}", "Kemono"] } }, diff --git a/gallery-dl/to_download_kemono.txt b/gallery-dl/to_download_kemono.txt new file mode 100644 index 0000000..04d974e --- /dev/null +++ b/gallery-dl/to_download_kemono.txt @@ -0,0 +1 @@ +https://kemono.su/fantia/user/8565