diff options
-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 . |