1.0.0020 - Attempt to speed up processess

pull/6/head
RandomNinjaAtk 3 years ago committed by GitHub
parent b99f58c093
commit f4b32d75ed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -36,7 +36,7 @@ Configuration () {
log ""
sleep 2
log "############# $dockerTitle"
log "############# SCRIPT VERSION 1.0.0019"
log "############# SCRIPT VERSION 1.0.0020"
log "############# DOCKER VERSION $dockerVersion"
if [ -z $topLimit ]; then
@ -207,12 +207,29 @@ DArtistAlbumList () {
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $currentprocess of $albumcount :: Album info already downloaded"
fi
done
if [ -f /config/extended/cache/deezer/$1-albums-temp.json ]; then
rm /config/extended/cache/deezer/$1-albums-temp.json
fi
if [ -f /config/extended/cache/deezer/$1-albums.json ]; then
testFile=$(cat /config/extended/cache/deezer/$1-albums.json)
if jq -e . >/dev/null 2>&1 <<<"$testFile"; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Existing album list verified..."
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Checking album list age..."
if find /config/extended/cache/deezer -type f -name "$1-albums.json" -mtime +1 | read; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Existing Album list older than 1 day, purging to create updated list..."
find /config/extended/cache/deezer -type f -name "$1-albums.json" -mtime +1 -delete
else
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Existing Album list is not older than 1 day..."
fi
else
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Existing album list failed verification..."
rm /config/extended/cache/deezer/$1-albums.json
fi
if [ -f /config/extended/cache/deezer/$1-albums-temp.json ]; then
rm /config/extended/cache/deezer/$1-albums-temp.json
fi
if [ ! -f /config/extended/cache/deezer/$1-albums.json ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Creating album list from $albumcount found albums..."
echo "[" >> /config/extended/cache/deezer/$1-albums-temp.json
for id in ${!albumids[@]}; do
@ -223,6 +240,7 @@ DArtistAlbumList () {
echo " }" >> /config/extended/cache/deezer/$1-albums.json
echo "]" >> /config/extended/cache/deezer/$1-albums.json
rm /config/extended/cache/deezer/$1-albums-temp.json
fi
}
TidalClientSetup () {

Loading…
Cancel
Save