v.2.46 - Removed unused function, might have resolved memory leak...

#269 - Resolves this?
This commit is contained in:
RandomNinjaAtk 2024-08-05 11:12:51 +00:00 committed by GitHub
parent 193f168511
commit ceb8a1b1c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash
scriptVersion="2.45"
scriptVersion="2.46"
scriptName="Audio"
### Import Settings
@ -843,16 +843,6 @@ ProcessWithBeets () {
fi
getLidarrAlbumId=$(curl -s "$arrUrl/api/v1/search?term=lidarr%3A${matchedTagsAlbumReleaseGroupId}&apikey=$arrApiKey" | jq -r .[].album.releases[].albumId | sort -u)
checkLidarrAlbumData="$(curl -s "$arrUrl/api/v1/album/$getLidarrAlbumId?apikey=${arrApiKey}")"
checkLidarrAlbumPercentOfTracks=$(echo "$checkLidarrAlbumData" | jq -r ".statistics.percentOfTracks")
if [ "$checkLidarrAlbumPercentOfTracks" = "null" ]; then
checkLidarrAlbumPercentOfTracks=0
return
fi
if [ ${checkLidarrAlbumPercentOfTracks%%.*} -ge 100 ]; then
if [ "$wantedAlbumListSource" == "missing" ]; then
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: ERROR :: Already Imported Album (Missing)"
rm -rf "$audioPath/incomplete"/*
@ -862,8 +852,6 @@ ProcessWithBeets () {
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Importing Album (Cutoff)"
return
fi
fi
}
@ -1743,36 +1731,6 @@ FuzzyTidalSearch () {
fi
}
CheckLidarrBeforeImport () {
alreadyImported=false
checkLidarrAlbumData="$(curl -s "$arrUrl/api/v1/album/$1?apikey=${arrApiKey}")"
checkLidarrAlbumPercentOfTracks=$(echo "$checkLidarrAlbumData" | jq -r ".statistics.percentOfTracks")
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Checking Lidarr for existing files"
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: $checkLidarrAlbumPercentOfTracks% Tracks found"
if [ "$checkLidarrAlbumPercentOfTracks" == "null" ]; then
checkLidarrAlbumPercentOfTracks=0
return
fi
if [ "${checkLidarrAlbumPercentOfTracks%%.*}" -ge "100" ]; then
if [ "$wantedAlbumListSource" == "missing" ]; then
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported Album (Missing), skipping..."
alreadyImported=true
return
fi
if [ "$wantedAlbumListSource" == "cutoff" ]; then
checkLidarrAlbumFiles="$(curl -s "$arrUrl/api/v1/trackFile?albumId=$1?apikey=${arrApiKey}")"
checkLidarrAlbumQualityCutoffNotMet=$(echo "$checkLidarrAlbumFiles" | jq -r ".[].qualityCutoffNotMet")
if echo "$checkLidarrAlbumQualityCutoffNotMet" | grep "true" | read; then
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported Album (CutOff - $checkLidarrAlbumQualityCutoffNotMet), skipping..."
alreadyImported=true
return
fi
fi
fi
}
LidarrTaskStatusCheck () {
alerted=no
until false