diff --git a/root/scripts/audio.sh b/root/scripts/audio.sh index aa14adf..438fa81 100644 --- a/root/scripts/audio.sh +++ b/root/scripts/audio.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.219" +scriptVersion="1.0.220" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" if [ "$lidarrUrlBase" = "null" ]; then @@ -336,18 +336,10 @@ TidalClientSetup () { tidal-dl -o $downloadPath/incomplete DownloadFormat - - if [ -f /config/xdg/.tidal-dl.token.json ]; then - if [[ $(find "/config/xdg/.tidal-dl.token.json" -mtime +5 -print) ]]; then - log "TIDAL :: ERROR :: Token expired, removing..." - rm /config/xdg/.tidal-dl.token.json - fi - fi - if [ ! -f /config/xdg/.tidal-dl.token.json ]; then TidaldlStatusCheck log "TIDAL :: ERROR :: Downgrade tidal-dl for workaround..." - pip3 install tidal-dl==2022.3.4.2 --no-cache-dir 1>/dev/null + pip3 install tidal-dl==2022.3.4.2 --no-cache-dir &>/dev/null log "TIDAL :: ERROR :: Loading client for required authentication, please authenticate, then exit the client..." TidaldlStatusCheck tidal-dl @@ -374,14 +366,14 @@ TidalClientSetup () { TidaldlStatusCheck log "TIDAL :: Upgrade tidal-dl to newer version..." - pip3 install tidal-dl==2022.07.06.1 --no-cache-dir 1>/dev/null + pip3 install tidal-dl==2022.07.06.1 --no-cache-dir &>/dev/null } TidalClientTest () { log "TIDAL :: tidal-dl client setup verification..." TidaldlStatusCheck - tidal-dl -o $downloadPath/incomplete -l "166356219" 1>/dev/null + tidal-dl -o $downloadPath/incomplete -l "166356219" &>/dev/null downloadCount=$(find $downloadPath/incomplete/ -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" | wc -l) if [ $downloadCount -le 0 ]; then @@ -525,7 +517,7 @@ DownloadProcess () { if [ $downloadTry = 1 ]; then DeezerClientTest fi - deemix -b $deemixQuality -p $downloadPath/incomplete "https://www.deezer.com/album/$1" 1>/dev/null + deemix -b $deemixQuality -p $downloadPath/incomplete "https://www.deezer.com/album/$1" &>/dev/null if [ -d "/tmp/deemix-imgs" ]; then rm -rf /tmp/deemix-imgs fi @@ -537,7 +529,7 @@ DownloadProcess () { TidalClientTest fi TidaldlStatusCheck - tidal-dl -o $downloadPath/incomplete -l "$1" 1>/dev/null + tidal-dl -o $downloadPath/incomplete -l "$1" &>/dev/null fi find "$downloadPath/incomplete" -type f -iname "*.flac" -newer "/temp-download" -print0 | while IFS= read -r -d '' file; do @@ -751,7 +743,7 @@ AddReplaygainTags () { # Input Data # $1 Folder path to scan and add tags log "$processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: Adding Replaygain Tags using r128gain" - r128gain -r -a "$1" 1>/dev/null + r128gain -r -a "$1" &>/dev/null } NotifyLidarrForImport () { @@ -810,14 +802,14 @@ DeemixClientSetup () { fi log "DEEZER :: Upgrade deemix to the latest..." - pip3 install deemix --upgrade 1>/dev/null + pip install deemix --upgrade &>/dev/null } DeezerClientTest () { log "DEEZER :: deemix client setup verification..." - deemix -b $deemixQuality -p $downloadPath/incomplete "https://www.deezer.com/album/197472472" 1>/dev/null + deemix -b $deemixQuality -p $downloadPath/incomplete "https://www.deezer.com/album/197472472" &>/dev/null if [ -d "/tmp/deemix-imgs" ]; then rm -rf /tmp/deemix-imgs fi @@ -1754,7 +1746,7 @@ ProcessWithBeets () { sleep 0.1 if [ $(find "$1" -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" | wc -l) -gt 0 ]; then - beet -c /scripts/beets-config.yaml -l /scripts/library.blb -d "$1" import -qC "$1" 1>/dev/null + beet -c /scripts/beets-config.yaml -l /scripts/library.blb -d "$1" import -qC "$1" &>/dev/null if [ $(find "$1" -type f -regex ".*/.*\.\(flac\|opus\|m4a\|mp3\)" -newer "/config/beets-match" | wc -l) -gt 0 ]; then log "$processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $lidarrAlbumType :: SUCCESS: Matched with beets!" else