Bug fix in Audio.sh

Looks like some copy-pasta. Prior to this fix I would see lots of errors in the Audio.log such as: `jq: error (at <stdin>:418): Cannot index string with string "qualityCutoffNotMet"`. With the fix the cutoff related code does what it is supposed to.
pull/144/head
Blake 2 years ago committed by GitHub
parent 05be9b4520
commit cce735b243
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1808,7 +1808,7 @@ CheckLidarrBeforeImport () {
if [ "$wantedAlbumListSource" == "cutoff" ]; then if [ "$wantedAlbumListSource" == "cutoff" ]; then
checkLidarrAlbumFiles="$(curl -s "$lidarrUrl/api/v1/trackFile?albumId=$1?apikey=${lidarrApiKey}")" checkLidarrAlbumFiles="$(curl -s "$lidarrUrl/api/v1/trackFile?albumId=$1?apikey=${lidarrApiKey}")"
checkLidarrAlbumQualityCutoffNotMet=$(echo "$checkLidarrAlbumData" | jq -r ".[].qualityCutoffNotMet") checkLidarrAlbumQualityCutoffNotMet=$(echo "$checkLidarrAlbumFiles" | jq -r ".[].qualityCutoffNotMet")
if echo "$checkLidarrAlbumQualityCutoffNotMet" | grep "true" | read; then if echo "$checkLidarrAlbumQualityCutoffNotMet" | grep "true" | read; then
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported Album (CutOff - $checkLidarrAlbumQualityCutoffNotMet), skipping..." log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported Album (CutOff - $checkLidarrAlbumQualityCutoffNotMet), skipping..."
alreadyImported=true alreadyImported=true

Loading…
Cancel
Save