v2.0 - Clean/clear download folder between downloads
This commit is contained in:
parent
e3ad878bee
commit
754a6d0e08
1 changed files with 8 additions and 2 deletions
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/with-contenv bash
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="1.9"
|
scriptVersion="2.0"
|
||||||
scriptName="TidalVideoDownloader"
|
scriptName="TidalVideoDownloader"
|
||||||
|
|
||||||
#### Import Settings
|
#### Import Settings
|
||||||
|
@ -260,6 +260,9 @@ VideoProcess () {
|
||||||
videoArtists="$(echo "$videoData" | jq -r ".artists[]")"
|
videoArtists="$(echo "$videoData" | jq -r ".artists[]")"
|
||||||
videoArtistsIds="$(echo "$videoArtists" | jq -r ".id")"
|
videoArtistsIds="$(echo "$videoArtists" | jq -r ".id")"
|
||||||
videoType=""
|
videoType=""
|
||||||
|
# clean/clear download folder
|
||||||
|
rm -rf "$videoDownloadPath"/*
|
||||||
|
|
||||||
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Processing..."
|
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Processing..."
|
||||||
|
|
||||||
if echo "$videoTitle" | grep -i "official" | grep -i "video" | read; then
|
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"
|
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
|
touch /config/extended/logs/tidal-video/$id
|
||||||
chmod 666 "/config/extended/logs/tidal-video/$id"
|
chmod 666 "/config/extended/logs/tidal-video/$id"
|
||||||
|
|
||||||
|
# clean/clear download folder
|
||||||
|
rm -rf "$videoDownloadPath"/*
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue