v1.0.004 - Plex workaround

Remove disambiguation from artist folder that would prevent plex from associating the videos
pull/35/head
RandomNinjaAtk 2 years ago committed by GitHub
parent 4c9ddadcac
commit 71e23de259
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.003" scriptVersion="1.0.004"
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=""
@ -85,6 +85,7 @@ CacheMusicbrainzRecords () {
lidarrArtistMusicbrainzId=$(echo $lidarrArtistData | jq -r .foreignArtistId) lidarrArtistMusicbrainzId=$(echo $lidarrArtistData | jq -r .foreignArtistId)
lidarrArtistPath="$(echo "${lidarrArtistData}" | jq -r " .path")" lidarrArtistPath="$(echo "${lidarrArtistData}" | jq -r " .path")"
lidarrArtistFolder="$(basename "${lidarrArtistPath}")" lidarrArtistFolder="$(basename "${lidarrArtistPath}")"
lidarrArtistFolder="$(echo "$lidarrArtistFolder" | sed "s/ (.*)$//g")" # Plex Sanitization, remove disambiguation
lidarrArtistNameSanitized="$(echo "$lidarrArtistFolder" | sed 's% (.*)$%%g')" lidarrArtistNameSanitized="$(echo "$lidarrArtistFolder" | sed 's% (.*)$%%g')"
if [ "$lidarrArtistName" == "Various Artists" ]; then if [ "$lidarrArtistName" == "Various Artists" ]; then

Loading…
Cancel
Save