From 2c966f6f8b2df4ff4ca0f780f6a8e1f61902812a Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Wed, 6 Jul 2022 18:22:22 -0400 Subject: [PATCH] v1.0.86 - Change to process for purging list data before getting updated list data.. --- root/scripts/download.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index 8d3b237..272106a 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.85" +scriptVersion="1.0.86" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -676,15 +676,12 @@ LidarrRootFolderCheck () { } GetMissingCutOffList () { - if [ -d /config/extended/cache/missing ]; then - rm -rf /config/extended/cache/missing + if [ -d /config/extended/cache/lidarr/list ]; then + rm -rf /config/extended/cache/lidarr/list + sleep 0.1 fi - if [ -d /config/extended/cache/lidarr/list ]; then - rm /config/extended/cache/lidarr/list/* - else - mkdir -p /config/extended/cache/lidarr/list - fi + mkdir -p /config/extended/cache/lidarr/list # Get missing album list lidarrMissingTotalRecords=$(wget --timeout=0 -q -O - "$lidarrUrl/api/v1/wanted/missing?page=1&pagesize=1&sortKey=releaseDate&sortDirection=desc&apikey=${lidarrApiKey}" | jq -r .totalRecords)