v2.45 - new prefer special editions config option

#254 - Resolves this?
This commit is contained in:
RandomNinjaAtk 2024-08-01 13:36:02 +00:00 committed by GitHub
parent d3113f7f42
commit 24c40c9c6f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1,5 +1,5 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
scriptVersion="2.44" scriptVersion="2.45"
scriptName="Audio" scriptName="Audio"
### Import Settings ### Import Settings
@ -65,6 +65,10 @@ verifyConfig () {
downloadClientTimeOut="10m" # if not set, set to 10 minutes downloadClientTimeOut="10m" # if not set, set to 10 minutes
fi fi
if [ -z "$preferSpecialEditions" ]; then
preferSpecialEditions="true"
fi
audioPath="$downloadPath/audio" audioPath="$downloadPath/audio"
@ -111,7 +115,7 @@ Configuration () {
else else
log "Add Deezer Top Artists is disabled (enable by setting addDeezerTopArtists=true)" log "Add Deezer Top Artists is disabled (enable by setting addDeezerTopArtists=true)"
fi fi
1708 W Rogers Ave, Baltimore, MD 21209, United States
if [ "$addDeezerTopAlbumArtists" == "true" ]; then if [ "$addDeezerTopAlbumArtists" == "true" ]; then
log "Add Deezer Top $topLimit Album Artists is enabled" log "Add Deezer Top $topLimit Album Artists is enabled"
else else
@ -178,6 +182,12 @@ Configuration () {
log "Beets Tagging Disabled" log "Beets Tagging Disabled"
fi fi
if [ "$preferSpecialEditions" == "true" ]; then
log "Prefer Special Editions Enabled"
else
log "Prefer Special Editions Disabled"
fi
log "Failed Download Attempt Threshold: $failedDownloadAttemptThreshold" log "Failed Download Attempt Threshold: $failedDownloadAttemptThreshold"
} }
@ -1291,7 +1301,11 @@ SearchProcess () {
# Get Release Titles # Get Release Titles
OLDIFS="$IFS" OLDIFS="$IFS"
IFS=$'\n' IFS=$'\n'
if [ "$preferSpecialEditions" == "true" ]; then
lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s -r | cut -d" " -f2-) lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s -r | cut -d" " -f2-)
else
lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s | cut -d" " -f2-)
fi
lidarrReleaseTitles=($(echo "$lidarrReleaseTitles")) lidarrReleaseTitles=($(echo "$lidarrReleaseTitles"))
IFS="$OLDIFS" IFS="$OLDIFS"