Skip to content

Commit 24c40c9

Browse files
v2.45 - new prefer special editions config option
#254 - Resolves this?
1 parent d3113f7 commit 24c40c9

File tree

1 file changed

+17
-3
lines changed

1 file changed

+17
-3
lines changed

lidarr/Audio.service.bash

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/with-contenv bash
2-
scriptVersion="2.44"
2+
scriptVersion="2.45"
33
scriptName="Audio"
44

55
### Import Settings
@@ -64,6 +64,10 @@ verifyConfig () {
6464
if [ -z "$downloadClientTimeOut" ]; then
6565
downloadClientTimeOut="10m" # if not set, set to 10 minutes
6666
fi
67+
68+
if [ -z "$preferSpecialEditions" ]; then
69+
preferSpecialEditions="true"
70+
fi
6771

6872
audioPath="$downloadPath/audio"
6973

@@ -111,7 +115,7 @@ Configuration () {
111115
else
112116
log "Add Deezer Top Artists is disabled (enable by setting addDeezerTopArtists=true)"
113117
fi
114-
118+
1708 W Rogers Ave, Baltimore, MD 21209, United States
115119
if [ "$addDeezerTopAlbumArtists" == "true" ]; then
116120
log "Add Deezer Top $topLimit Album Artists is enabled"
117121
else
@@ -178,6 +182,12 @@ Configuration () {
178182
log "Beets Tagging Disabled"
179183
fi
180184

185+
if [ "$preferSpecialEditions" == "true" ]; then
186+
log "Prefer Special Editions Enabled"
187+
else
188+
log "Prefer Special Editions Disabled"
189+
fi
190+
181191
log "Failed Download Attempt Threshold: $failedDownloadAttemptThreshold"
182192

183193
}
@@ -1291,7 +1301,11 @@ SearchProcess () {
12911301
# Get Release Titles
12921302
OLDIFS="$IFS"
12931303
IFS=$'\n'
1294-
lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s -r | cut -d" " -f2-)
1304+
if [ "$preferSpecialEditions" == "true" ]; then
1305+
lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s -r | cut -d" " -f2-)
1306+
else
1307+
lidarrReleaseTitles=$(cat /temp-release-list | awk '{ print length, $0 }' | sort -u -n -s | cut -d" " -f2-)
1308+
fi
12951309
lidarrReleaseTitles=($(echo "$lidarrReleaseTitles"))
12961310
IFS="$OLDIFS"
12971311

0 commit comments

Comments
 (0)