From ae84972d035ee14966c176fb420fbe1d28402feb Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Mon, 19 Aug 2024 11:00:21 +0000 Subject: [PATCH] Update Extras.bash --- radarr/Extras.bash | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/radarr/Extras.bash b/radarr/Extras.bash index 1bc1b02..bdca75d 100644 --- a/radarr/Extras.bash +++ b/radarr/Extras.bash @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.3" +scriptVersion="1.4" arrEventType="$radarr_eventtype" arrItemId=$radarr_movie_id tmdbApiKey="3b7751e3179f796565d88fdb2fcdf426" @@ -232,8 +232,10 @@ do if [ -f "$tempFolder/$finalFileName.mkv" ]; then log "$itemTitle :: $i of $tmdbVideosListDataIdsCount :: $tmdbExtraType :: $tmdbExtraTitle :: Moving file to final destination" mv "$tempFolder/$finalFileName.mkv" "$finalPath/$finalFileName.mkv" - chmod 666 "$finalPath/$finalFileName.mkv" - rm -rf "$tempFolder" + chmod 666 "$finalPath/$finalFileName.mkv" + if [ -d "$tempFolder" ]; then + rm -rf "$tempFolder" + fi fi updatePlex="true"