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
|
#!/usr/bin/with-contenv bash
|
||||||
scriptVersion="2.45"
|
scriptVersion="2.46"
|
||||||
scriptName="Audio"
|
scriptName="Audio"
|
||||||
|
|
||||||
### Import Settings
|
### Import Settings
|
||||||
|
@ -842,28 +842,16 @@ ProcessWithBeets () {
|
||||||
touch "/config/extended/logs/downloaded/musicbrainz_matched/$matchedTagsAlbumReleaseGroupId"
|
touch "/config/extended/logs/downloaded/musicbrainz_matched/$matchedTagsAlbumReleaseGroupId"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
getLidarrAlbumId=$(curl -s "$arrUrl/api/v1/search?term=lidarr%3A${matchedTagsAlbumReleaseGroupId}&apikey=$arrApiKey" | jq -r .[].album.releases[].albumId | sort -u)
|
if [ "$wantedAlbumListSource" == "missing" ]; then
|
||||||
checkLidarrAlbumData="$(curl -s "$arrUrl/api/v1/album/$getLidarrAlbumId?apikey=${arrApiKey}")"
|
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: ERROR :: Already Imported Album (Missing)"
|
||||||
checkLidarrAlbumPercentOfTracks=$(echo "$checkLidarrAlbumData" | jq -r ".statistics.percentOfTracks")
|
rm -rf "$audioPath/incomplete"/*
|
||||||
|
touch /config/extended/beets-error
|
||||||
if [ "$checkLidarrAlbumPercentOfTracks" = "null" ]; then
|
return
|
||||||
checkLidarrAlbumPercentOfTracks=0
|
else
|
||||||
|
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Importing Album (Cutoff)"
|
||||||
return
|
return
|
||||||
fi
|
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
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1743,36 +1731,6 @@ FuzzyTidalSearch () {
|
||||||
fi
|
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 () {
|
LidarrTaskStatusCheck () {
|
||||||
alerted=no
|
alerted=no
|
||||||
until false
|
until false
|
||||||
|
|
Loading…
Reference in a new issue