From 67041681220892e8957feb5b5cc509150c799eb1 Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 23 Jun 2022 12:23:25 +0000 Subject: [PATCH] 1.0.0053 - Only process missing albums Simplifying things... --- root/scripts/download.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/root/scripts/download.sh b/root/scripts/download.sh index bdc4ab9..919e52c 100644 --- a/root/scripts/download.sh +++ b/root/scripts/download.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.0052" +scriptVersion="1.0.0053" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then lidarrUrlBase="" @@ -634,12 +634,13 @@ GetMissingCutOffList () { missingAlbumIdsTotal=$(echo "$missingAlbumIds" | sed -r '/^\s*$/d' | wc -l) log ":: FINDING MISSING ALBUMS: ${missingAlbumIdsTotal} Found" - log ":: Downloading cutoff list..." - cutoffAlbumIds=$(curl -s "$lidarrUrl/api/v1/wanted/cutoff?page=1&pagesize=1000000000&sortKey=releaseDate&sortDirection=desc&apikey=${lidarrApiKey}" | jq -r '.records | .[] | .id') - cutoffAlbumIdsTotal=$(echo "$cutoffAlbumIds" | sed -r '/^\s*$/d'| wc -l) - log ":: FINDING CUTOFF ALBUMS: ${cutoffAlbumIdsTotal} Found" + #log ":: Downloading cutoff list..." + #cutoffAlbumIds=$(curl -s "$lidarrUrl/api/v1/wanted/cutoff?page=1&pagesize=1000000000&sortKey=releaseDate&sortDirection=desc&apikey=${lidarrApiKey}" | jq -r '.records | .[] | .id') + #cutoffAlbumIdsTotal=$(echo "$cutoffAlbumIds" | sed -r '/^\s*$/d'| wc -l) + #log ":: FINDING CUTOFF ALBUMS: ${cutoffAlbumIdsTotal} Found" - wantedListAlbumIds="$(echo "${missingAlbumIds}" && echo "${cutoffAlbumIds}")" + #wantedListAlbumIds="$(echo "${missingAlbumIds}" && echo "${cutoffAlbumIds}")" + wantedListAlbumIds="$(echo "${missingAlbumIds}")" wantedListAlbumTotal=$(echo "$wantedListAlbumIds" | sed -r '/^\s*$/d' | wc -l) log ":: Searching for $wantedListAlbumTotal items"