1.0.178 - log enhancements, add comments, re-order searches to move fuzzy to end

pull/16/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 1d39d74b59
commit 6dccb9c8c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="1.0.177"
scriptVersion="1.0.178"
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" = "null" ]; then
lidarrUrlBase=""
@ -1220,24 +1220,14 @@ SearchProcess () {
# Search for explicit matches
if [ $audioLyricType = both ] || [ $audioLyricType = explicit ]; then
# Tidal search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "tidal" ]; then
FuzzyTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "true"
fi
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported, skipping..."
continue
fi
# Tidal Artist search
if [ "$skipTidal" = "false" ]; then
for tidalArtistId in $(echo $tidalArtistIds); do
ArtistTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "$tidalArtistId" "true"
done
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
@ -1245,11 +1235,12 @@ SearchProcess () {
continue
fi
# Deezer fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "deezer" ]; then
FuzzyDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "true"
# Tidal fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "tidal" ]; then
FuzzyTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "true"
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
@ -1265,8 +1256,7 @@ SearchProcess () {
done
fi
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
@ -1274,11 +1264,10 @@ SearchProcess () {
continue
fi
# Search for clean matches
if [ $audioLyricType = both ] || [ $audioLyricType = clean ]; then
# Tidal search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "tidal" ]; then
FuzzyTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "false"
# Deezer fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "deezer" ]; then
FuzzyDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "true"
fi
fi
LidarrTaskStatusCheck
@ -1288,12 +1277,16 @@ SearchProcess () {
continue
fi
# Search for clean matches
if [ $audioLyricType = both ] || [ $audioLyricType = clean ]; then
# Tidal Artist search
if [ "$skipTidal" = "false" ]; then
for tidalArtistId in $(echo $tidalArtistIds); do
ArtistTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "$tidalArtistId" "false"
done
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
@ -1301,11 +1294,12 @@ SearchProcess () {
continue
fi
# Deezer fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "deezer" ]; then
FuzzyDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "false"
# Tidal Fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "tidal" ]; then
FuzzyTidalSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "false"
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
@ -1320,9 +1314,23 @@ SearchProcess () {
ArtistDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "$deezerArtistId" "false"
done
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: Already Imported, skipping..."
continue
fi
# Deezer fuzzy search
if [ "$dlClientSource" = "both" ] || [ "$dlClientSource" = "deezer" ]; then
FuzzyDeezerSearch "$processNumber of $wantedListAlbumTotal" "$wantedAlbumId" "false"
fi
fi
fi
# Lidarr Status Check
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$checkLidarrAlbumId" "notbeets"
if [ $alreadyImported = true ]; then

Loading…
Cancel
Save