diff options
author | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:35:25 -0500 |
---|---|---|
committer | techchud <protrude_paying969@simplelogin.com> | 2025-08-17 19:35:25 -0500 |
commit | bf966345c1be6de4848d3b6a092fb44f3094a464 (patch) | |
tree | 09f33f8e987fdd8a6d34f5aa4de144b5e4d7a828 | |
parent | f1270a633e908a956b881ce084df69bb7d96458e (diff) | |
download | stashley-bf966345c1be6de4848d3b6a092fb44f3094a464.tar.gz stashley-bf966345c1be6de4848d3b6a092fb44f3094a464.tar.bz2 stashley-bf966345c1be6de4848d3b6a092fb44f3094a464.zip |
add deviantart support and use case instead of if-else chain
-rwxr-xr-x | stashley | 27 |
1 files changed, 14 insertions, 13 deletions
@@ -5,21 +5,22 @@ do then tomlq -r ".$site.urls[]" "$1" | while IFS= read -r url; do - if [ "$site" = "youtube" ] - then - yt-dlp --write-info-json --write-description --write-thumbnail --write-annotations --all-subs --ignore-error -f 'bestvideo[height>=720][fps>=60]+bestaudio/bestvideo+bestaudio/best' -o 'YouTube/%(uploader|author)s/%(title)s.%(ext)s' "$url" - elif [ "$site" = "website" ] - then - wget --mirror --warc-file="echo $url|sed -e '//\//slash/g'" - elif [ "$site" = "toyhouse" ] || [ "$site" = "instagram" ] || [ "$site" = "twitter" ] - then - gallery-dl --write-metadata "$url" - else - gallery-dl --write-metadata "$site":"$url" - fi + case "$site" in + youtube) + yt-dlp --write-info-json --write-description --write-thumbnail --write-annotations --all-subs --ignore-error -f 'bestvideo[height>=720][fps>=60]+bestaudio/bestvideo+bestaudio/best' -o 'YouTube/%(uploader|author)s/%(title)s.%(ext)s' "$url" + ;; + website) + wget --mirror --warc-file="echo $url|sed -e '//\//slash/g'" + ;; + toyhouse | instagram | twitter | deviantart) + gallery-dl --write-metadata "$url" + ;; + *) + gallery-dl --write-metadata "$site":"$url" + ;; + esac done fi - done fdupes -dIr . |