diff options
| author | msglm <msglm@techchud.xyz> | 2023-07-30 22:48:35 -0500 | 
|---|---|---|
| committer | msglm <msglm@techchud.xyz> | 2023-07-30 22:48:35 -0500 | 
| commit | b8070a9f1887d0a46637bad8614d14204c9ede0a (patch) | |
| tree | 09f33f8e987fdd8a6d34f5aa4de144b5e4d7a828 | |
| parent | a391d251dd0d9165581f2713d6afaf7c85997c1f (diff) | |
| download | stashley-b8070a9f1887d0a46637bad8614d14204c9ede0a.tar.gz stashley-b8070a9f1887d0a46637bad8614d14204c9ede0a.tar.bz2 stashley-b8070a9f1887d0a46637bad8614d14204c9ede0a.zip | |
add deviantart support and use case instead of if-else chainv1.0.5
| -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 . | 
