From ab6e60c21355aa644bb6eb5eeb519626279e11c2 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 15 Aug 2022 17:26:46 +0000 Subject: [PATCH] v1.0.028 - Delete Empty Files --- root/scripts/video.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/root/scripts/video.sh b/root/scripts/video.sh index 9dbe941..209f81d 100644 --- a/root/scripts/video.sh +++ b/root/scripts/video.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.027" +scriptVersion="1.0.028" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" @@ -689,6 +689,9 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do else log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: Processing $imvdbArtistVideoCount Videos!" fi + + find /config/extended/cache/imvdb -type f -empty -delete # delete empty files + imvdbProcessCount=0 for imvdbVideoData in $(ls /config/extended/cache/imvdb/$lidarrArtistMusicbrainzId--*.json); do imvdbProcessCount=$(( $imvdbProcessCount + 1 )) @@ -721,6 +724,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do sleep 1 fi fi + find /config/extended/cache/imvdb -type f -empty -delete # delete empty files if [ -z "$featuredArtistName" ]; then continue fi