From c111d6433eff1b12ed9473de934a4d539babcede Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Thu, 24 Nov 2022 13:18:25 -0500 Subject: [PATCH] 1.0.300 - Bug fix for master quality... --- root/scripts/Audio.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/root/scripts/Audio.sh b/root/scripts/Audio.sh index e0f279b..60ea5ea 100644 --- a/root/scripts/Audio.sh +++ b/root/scripts/Audio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.299" +scriptVersion="1.0.300" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" == "null" ]; then @@ -819,7 +819,15 @@ DownloadQualityCheck () { fi fi if [ "$audioFormat" == "native" ]; then - if [ "$audioBitrate" == "lossless" ]; then + if [ "$audioBitrate" == "master" ]; then + if find "$1" -type f -regex ".*/.*\.\(opus\|m4a\|mp3\)"| read; then + log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Unwanted files found!" + log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Performing cleanup..." + rm "$1"/* + else + log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: No unwanted files found!" + fi + elif [ "$audioBitrate" == "lossless" ]; then if find "$1" -type f -regex ".*/.*\.\(opus\|m4a\|mp3\)"| read; then log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Unwanted files found!" log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Performing cleanup..."