Skip to content

Commit 754a6d0

Browse files
v2.0 - Clean/clear download folder between downloads
1 parent e3ad878 commit 754a6d0

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lidarr/TidalVideoDownloader.bash

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/with-contenv bash
2-
scriptVersion="1.9"
2+
scriptVersion="2.0"
33
scriptName="TidalVideoDownloader"
44

55
#### Import Settings
@@ -260,7 +260,10 @@ VideoProcess () {
260260
videoArtists="$(echo "$videoData" | jq -r ".artists[]")"
261261
videoArtistsIds="$(echo "$videoArtists" | jq -r ".id")"
262262
videoType=""
263-
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Processing..."
263+
# clean/clear download folder
264+
rm -rf "$videoDownloadPath"/*
265+
266+
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Processing..."
264267

265268
if echo "$videoTitle" | grep -i "official" | grep -i "video" | read; then
266269
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Official Music Video Match Found!"
@@ -496,6 +499,9 @@ VideoProcess () {
496499
log "$processCount/$lidarrArtistCount :: $lidarrArtistName :: $tidalVideoProcessNumber/$tidalVideoIdsCount :: $videoTitle ($id) :: Logging completed download $id to: /config/extended/logs/tidal-video/$id"
497500
touch /config/extended/logs/tidal-video/$id
498501
chmod 666 "/config/extended/logs/tidal-video/$id"
502+
503+
# clean/clear download folder
504+
rm -rf "$videoDownloadPath"/*
499505
done
500506
done
501507
}

0 commit comments

Comments
 (0)