@ -1,5 +1,5 @@
#!/usr/bin/env bash
#!/usr/bin/env bash
scriptVersion = "1.0.07 1 "
scriptVersion = "1.0.07 2 "
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) "
@ -812,6 +812,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do
imvdbProcessCount = $(( $imvdbProcessCount + 1 ))
imvdbProcessCount = $(( $imvdbProcessCount + 1 ))
imvdbVideoTitle = " $( cat " $imvdbVideoData " | jq -r .song_title) "
imvdbVideoTitle = " $( cat " $imvdbVideoData " | jq -r .song_title) "
videoTitleClean = " $( echo " $imvdbVideoTitle " | sed -e " s/[^[:alpha:][:digit:] $^&_+=()'%;{},.@#]/ /g " -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g' ) "
videoTitleClean = " $( echo " $imvdbVideoTitle " | sed -e " s/[^[:alpha:][:digit:] $^&_+=()'%;{},.@#]/ /g " -e "s/ */ /g" | sed 's/^[.]*//' | sed 's/[.]*$//g' | sed 's/^ *//g' | sed 's/ *$//g' ) "
imvdbVideoYear = ""
imvdbVideoYear = " $( cat " $imvdbVideoData " | jq -r .year) "
imvdbVideoYear = " $( cat " $imvdbVideoData " | jq -r .year) "
imvdbVideoImage = " $( cat " $imvdbVideoData " | jq -r .image.o) "
imvdbVideoImage = " $( cat " $imvdbVideoData " | jq -r .image.o) "
imvdbVideoArtistsSlug = " $( cat " $imvdbVideoData " | jq -r .artists[ ] .slug) "
imvdbVideoArtistsSlug = " $( cat " $imvdbVideoData " | jq -r .artists[ ] .slug) "
@ -872,8 +873,12 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do
fi
fi
videoThumbnail = " $imvdbVideoImage "
videoThumbnail = " $imvdbVideoImage "
if [ -z " $imvdbVideoYear " ] ; then
videoUploadDate = " $( echo " $videoData " | jq -r .upload_date) "
videoUploadDate = " $( echo " $videoData " | jq -r .upload_date) "
videoYear = " ${ videoUploadDate : 0 : 4 } "
videoYear = " ${ videoUploadDate : 0 : 4 } "
else
videoYear = " $imvdbVideoYear "
fi
videoSource = "youtube"
videoSource = "youtube"
log " $processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${ imvdbVideoTitle } :: $videoDownloadUrl ... "
log " $processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${ imvdbVideoTitle } :: $videoDownloadUrl ... "