1.0.10 - New Feature - download using Freyr client

#102 - Resolves this request

If no ARL token is provided, use Freyr software to perform download without an account.

requireQuality must be disabled for it to function.
dlClientSource must be set to "both" or "deezer"

More info on Freyr can be found here: https://github.com/miraclx/freyr-js
main
RandomNinjaAtk 12 months ago committed by GitHub
parent 4cacf4233e
commit b14973cba5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,5 +1,5 @@
#!/usr/bin/env bash #!/usr/bin/env bash
scriptVersion="1.0.9" scriptVersion="1.0.10"
if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then
lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)"
if [ "$lidarrUrlBase" == "null" ]; then if [ "$lidarrUrlBase" == "null" ]; then
@ -24,7 +24,7 @@ fi
#addRelatedArtists="true" #addRelatedArtists="true"
#numberOfRelatedArtistsToAddPerArtist="1" #numberOfRelatedArtistsToAddPerArtist="1"
#beetsMatchPercentage="90" #beetsMatchPercentage="90"
#requireQuality="true" #requireQuality="false"
#searchSort="album" #searchSort="album"
#arlToken="" #arlToken=""
#matchDistance=10 #matchDistance=10
@ -174,6 +174,10 @@ Configuration () {
} }
DownloadClientFreyr () {
freyr -d /downloads-lidarr-extended/incomplete deezer:album:$1
}
DownloadFormat () { DownloadFormat () {
if [ "$audioFormat" == "native" ]; then if [ "$audioFormat" == "native" ]; then
@ -434,7 +438,11 @@ DownloadProcess () {
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Download Attempt number $downloadTry" log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Download Attempt number $downloadTry"
if [ "$2" == "DEEZER" ]; then if [ "$2" == "DEEZER" ]; then
deemix -b $deemixQuality -p "$downloadPath"/incomplete "https://www.deezer.com/album/$1" if [ -z $arlToken ]; then
DownloadClientFreyr $1
else
deemix -b $deemixQuality -p "$downloadPath"/incomplete "https://www.deezer.com/album/$1"
fi
if [ -d "/tmp/deemix-imgs" ]; then if [ -d "/tmp/deemix-imgs" ]; then
rm -rf /tmp/deemix-imgs rm -rf /tmp/deemix-imgs
@ -524,13 +532,9 @@ DownloadProcess () {
done done
# Consolidate files to a single folder # Consolidate files to a single folder
if [ "$2" == "TIDAL" ]; then log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Consolidating files to single folder"
log "$page :: $wantedAlbumListSource :: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: $lidarrAlbumType :: Consolidating files to single folder" find "$downloadPath/incomplete" -type f -exec mv "{}" "$downloadPath"/incomplete/ \;
find "$downloadPath/incomplete" -type f -exec mv "{}" "$downloadPath"/incomplete/ \; find /downloads-lidarr-extended/incomplete/ -type d -mindepth 1 -maxdepth 1 -exec rm -rf {} \;
if [ -d "$downloadPath"/incomplete/atd ]; then
rm -rf "$downloadPath"/incomplete/atd
fi
fi
downloadCount=$(find "$downloadPath"/incomplete/ -type f -regex ".*/.*\.\(flac\|m4a\|mp3\)" | wc -l) downloadCount=$(find "$downloadPath"/incomplete/ -type f -regex ".*/.*\.\(flac\|m4a\|mp3\)" | wc -l)
if [ "$downloadCount" -gt "0" ]; then if [ "$downloadCount" -gt "0" ]; then

Loading…
Cancel
Save