diff --git a/root/scripts/Video.sh b/root/scripts/Video.sh index 07a26d1..5e0a627 100644 --- a/root/scripts/Video.sh +++ b/root/scripts/Video.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.0.064" +scriptVersion="1.0.065" if [ -z "$lidarrUrl" ] || [ -z "$lidarrApiKey" ]; then lidarrUrlBase="$(cat /config/config.xml | xq | jq -r .Config.UrlBase)" @@ -491,6 +491,7 @@ VideoNfoWriter () { echo " $lidarrArtistMusicbrainzId" >> "$nfo" echo " " >> "$nfo" echo " ${1}${2}.jpg" >> "$nfo" + echo " $8" >> "$nfo" echo "" >> "$nfo" tidy -w 2000 -i -m -xml "$nfo" &>/dev/null chmod 666 "$nfo" @@ -718,6 +719,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do videoImageId="$(echo "$videoData" | jq -r ".imageId")" videoImageIdFix="$(echo "$videoImageId" | sed "s/-/\//g")" videoThumbnail="https://resources.tidal.com/images/$videoImageIdFix/750x500.jpg" + videoSource="tidal" fi if echo "$videoDownloadUrl" | grep -i "youtube" | read; then @@ -730,6 +732,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do videoThumbnail="$(echo "$videoData" | jq -r .thumbnail)" videoUploadDate="$(echo "$videoData" | jq -r .upload_date)" videoYear="${videoUploadDate:0:4}" + videoSource="youtube" fi DownloadVideo "$videoDownloadUrl" "$musicbrainzVideoTitleClean" "$plexVideoType" "MBZDB" @@ -740,7 +743,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do DownloadThumb "$videoThumbnail" "$musicbrainzVideoTitleClean" "$plexVideoType" "MBZDB" VideoProcessWithSMA "MBZDB" "$musicbrainzVideoTitle" VideoTagProcess "$musicbrainzVideoTitleClean" "$plexVideoType" "$videoYear" "MBZDB" - VideoNfoWriter "$musicbrainzVideoTitleClean" "$plexVideoType" "$musicbrainzVideoTitle" "" "musicbrainz" "$videoYear" "MBZDB" + VideoNfoWriter "$musicbrainzVideoTitleClean" "$plexVideoType" "$musicbrainzVideoTitle" "" "musicbrainz" "$videoYear" "MBZDB" "$videoSource" if [ ! -d "$videoPath/$lidarrArtistFolderNoDisambig" ]; then mkdir -p "$videoPath/$lidarrArtistFolderNoDisambig" @@ -835,6 +838,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do videoThumbnail="$imvdbVideoImage" videoUploadDate="$(echo "$videoData" | jq -r .upload_date)" videoYear="${videoUploadDate:0:4}" + videoSource="youtube" log "$processCount of $lidarrArtistIdsCount :: IMVDB :: $lidarrArtistName :: ${imvdbVideoTitle} :: $videoDownloadUrl..." DownloadVideo "$videoDownloadUrl" "$videoTitleClean" "$plexVideoType" "IMVDB" @@ -845,7 +849,7 @@ for lidarrArtistId in $(echo $lidarrArtistIds); do DownloadThumb "$imvdbVideoImage" "$videoTitleClean" "$plexVideoType" "IMVDB" VideoProcessWithSMA "IMVDB" "$imvdbVideoTitle" VideoTagProcess "$videoTitleClean" "$plexVideoType" "$videoYear" "IMVDB" - VideoNfoWriter "$videoTitleClean" "$plexVideoType" "$imvdbVideoTitle" "" "imvdb" "$videoYear" "IMVDB" + VideoNfoWriter "$videoTitleClean" "$plexVideoType" "$imvdbVideoTitle" "" "imvdb" "$videoYear" "IMVDB" "$videoSource" if [ ! -d "$videoPath/$lidarrArtistFolderNoDisambig" ]; then mkdir -p "$videoPath/$lidarrArtistFolderNoDisambig"