v.2.46 - Removed unused function, might have resolved memory leak...
#269 - Resolves this?
This commit is contained in:
parent
193f168511
commit
ceb8a1b1c7
1 changed files with 9 additions and 51 deletions
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
scriptVersion="2.45"
|
||||
scriptVersion="2.46"
|
||||
scriptName="Audio"
|
||||
|
||||
### Import Settings
|
||||
|
@ -843,28 +843,16 @@ 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
|
||||
if [ "$wantedAlbumListSource" == "missing" ]; then
|
||||
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: ERROR :: Already Imported Album (Missing)"
|
||||
rm -rf "$audioPath/incomplete"/*
|
||||
touch /config/extended/beets-error
|
||||
return
|
||||
else
|
||||
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Importing Album (Cutoff)"
|
||||
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"/*
|
||||
touch /config/extended/beets-error
|
||||
return
|
||||
else
|
||||
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Importing Album (Cutoff)"
|
||||
return
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
}
|
||||
|
||||
DownloadQualityCheck () {
|
||||
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue