v2.0 - Clean/clear download folder between downloads

This commit is contained in:
RandomNinjaAtk 2024-08-08 10:33:24 +00:00 committed by GitHub
parent e3ad878bee
commit 754a6d0e08
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash
scriptVersion="1.9"
scriptVersion="2.0"
scriptName="TidalVideoDownloader"
#### Import Settings
@ -260,6 +260,9 @@ VideoProcess () {
videoArtists="$(echo "$videoData" | jq -r ".artists[]")"
videoArtistsIds="$(echo "$videoArtists" | jq -r ".id")"
videoType=""
# clean/clear download folder
rm -rf "$videoDownloadPath"/*
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Processing..."
if echo "$videoTitle" | grep -i "official" | grep -i "video" | read; then
@ -496,6 +499,9 @@ VideoProcess () {
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Logging completed download $id to: /config/extended/logs/tidal-video/$id"
touch /config/extended/logs/tidal-video/$id
chmod 666 "/config/extended/logs/tidal-video/$id"
# clean/clear download folder
rm -rf "$videoDownloadPath"/*
done
done
}