v1.0.87 - New Feat, check musicbrainz for deezer album id

This will enable using album id's stored in the musicbrainz service for pulling downloads, this will save time and enable more precision when pulling albums

#9
pull/16/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 2c966f6f8b
commit 6a2bac6254
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.86" scriptVersion="1.0.87"
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
lidarrUrlBase="" lidarrUrlBase=""
@ -272,7 +272,7 @@ DArtistAlbumList () {
albumcount="$(python3 /config/extended/scripts/discography.py "$1" | sort -u | wc -l)" albumcount="$(python3 /config/extended/scripts/discography.py "$1" | sort -u | wc -l)"
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Searching for \"$1\" All Albums...." log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: Searching Arist ID \"$1\" for All Albums...."
if [ $albumcount -gt 0 ]; then if [ $albumcount -gt 0 ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $albumcount Albums found!" log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistNameSanitized :: $lidarrAlbumTitle :: $albumcount Albums found!"
else else
@ -825,6 +825,28 @@ SearchProcess () {
skipDeezer=false skipDeezer=false
skipTidal=false skipTidal=false
fi fi
if [ $audioLyricType = both ]; then
if [ "$skipDeezer" = "false" ]; then
LidarrTaskStatusCheck
CheckLidarrBeforeImport "$lidarrAlbumForeignAlbumId" "notbeets"
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: Musicbrainz Deezer Album ID :: Searching for Album ID..."
msuicbrainzDeezerDownloadAlbumID=$(curl -s "https://musicbrainz.org/ws/2/release?release-group=$lidarrAlbumForeignAlbumId&inc=url-rels&fmt=json" | jq -r | grep "deezer.com" | grep "album" | head -n 1 | sed -e "s%[^[:digit:]]%%g")
if [ ! -z $msuicbrainzDeezerDownloadAlbumID ]; then
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: Musicbrainz Deezer Album ID :: FOUND!"
if [ - f "/config/extended/cache/deezer/${msuicbrainzDeezerDownloadAlbumID}.json" ]; then
downloadedReleaseDate="$(cat "/config/extended/cache/deezer/${msuicbrainzDeezerDownloadAlbumID}.json" | jq -r .release_date)"
downloadedReleaseYear="${downloadedReleaseDate:0:4}"
else
downloadedReleaseDate="$(curl -s "https://api.deezer.com/album/${msuicbrainzDeezerDownloadAlbumID}" | jq -r .release_date)"
downloadedReleaseYear="${downloadedReleaseDate:0:4}"
fi
DownloadProcess "$msuicbrainzDeezerDownloadAlbumID" "DEEZER" "$downloadedReleaseYear"
else
log ":: $processNumber of $wantedListAlbumTotal :: $lidarrArtistName :: $lidarrAlbumTitle :: Musicbrainz Deezer Album ID :: NOT FOUND!"
fi
fi
fi
if [ "$skipDeezer" = "false" ]; then if [ "$skipDeezer" = "false" ]; then

Loading…
Cancel
Save