diff --git a/lidarr/Video.service.bash b/lidarr/Video.service.bash index 79a3e59..4e09b84 100644 --- a/lidarr/Video.service.bash +++ b/lidarr/Video.service.bash @@ -222,13 +222,19 @@ DownloadVideo () { chmod 777 "$videoDownloadPath/incomplete" fi + ytdlpConfigurableArgs="" + if [ ! -z "$cookiesFile" ]; then + ytdlpConfigurableArgs='${ytdlpConfigurableArgs} --cookies "$cookiesFile ' + fi + + if [ "$videoInfoJson" == "true" ]; then + ytdlpConfigurableArgs='${ytdlpConfigurableArgs} --write-info-json ' + fi + + if echo "$1" | grep -i "youtube" | read; then if [ $videoContainer = mkv ]; then - if [ ! -z "$cookiesFile" ]; then - yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$videoDownloadPath/incomplete/${2}${3}" --embed-subs --sub-lang $youtubeSubtitleLanguage --merge-output-format mkv --remux-video mkv --no-mtime --geo-bypass "$1" - else - yt-dlp -f "$videoFormat" --no-video-multistreams -o "$videoDownloadPath/incomplete/${2}${3}" --embed-subs --sub-lang $youtubeSubtitleLanguage --merge-output-format mkv --remux-video mkv --no-mtime --geo-bypass "$1" - fi + yt-dlp -f "$videoFormat" --no-video-multistreams -o "$videoDownloadPath/incomplete/${2}${3}" $ytdlpConfigurableArgs --embed-subs --sub-lang $youtubeSubtitleLanguage --merge-output-format mkv --remux-video mkv --no-mtime --geo-bypass "$1" if [ -f "$videoDownloadPath/incomplete/${2}${3}.mkv" ]; then chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mkv" downloadFailed=false @@ -236,11 +242,7 @@ DownloadVideo () { downloadFailed=true fi else - if [ ! -z "$cookiesFile" ]; then - yt-dlp --format-sort ext:mp4:m4a --merge-output-format mp4 --no-video-multistreams --cookies "$cookiesFile" -o "$videoDownloadPath/incomplete/${2}${3}" --embed-subs --sub-lang $youtubeSubtitleLanguage --no-mtime --geo-bypass "$1" - else - yt-dlp --format-sort ext:mp4:m4a --merge-output-format mp4 --no-video-multistreams -o "$videoDownloadPath/incomplete/${2}${3}" --embed-subs --sub-lang $youtubeSubtitleLanguage --no-mtime --geo-bypass "$1" - fi + yt-dlp --format-sort ext:mp4:m4a --merge-output-format mp4 --no-video-multistreams -o "$videoDownloadPath/incomplete/${2}${3}" $ytdlpConfigurableArgs --embed-subs --sub-lang $youtubeSubtitleLanguage --no-mtime --geo-bypass "$1" if [ -f "$videoDownloadPath/incomplete/${2}${3}.mp4" ]; then chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mp4" downloadFailed=false diff --git a/lidarr/extended.conf b/lidarr/extended.conf index 59ec5a9..4bb7848 100644 --- a/lidarr/extended.conf +++ b/lidarr/extended.conf @@ -70,6 +70,7 @@ preventRelatedArtistsLoop="true" # true = enabled :: This will prevent a ##### VIDEO SCRIPT addFeaturedVideoArtists="false" # true = enabled :: WARNING !!! WARNING !!! Enabling this can cause an endless loop of additional artists.... Enabling this will enable the extended Video script to automatically add Music Video Featured Artists to your existing Lidarr artists from IMVDB videoFormat="bv[width>=1920]+ba" # ONLY CHANGE if you know what your doing, for guidence, please see yt-dlp documentation. +videoInfoJson="false" # true = enabled :: Stores yt-dlp info-json files alongside video files. youtubeSubtitleLanguage="en" # Desired Language Code :: For guidence, please see yt-dlp documentation. disableImvd="false" # true = enabled :: Use this to disable IMVDB as a source, will result in only tidal videos