Skip to content

Commit 403d5ed

Browse files
committed
Toggleable yt-dlp info json
1 parent ef8fc99 commit 403d5ed

File tree

2 files changed

+13
-10
lines changed

2 files changed

+13
-10
lines changed

lidarr/Video.service.bash

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -222,25 +222,27 @@ DownloadVideo () {
222222
chmod 777 "$videoDownloadPath/incomplete"
223223
fi
224224

225+
ytdlpConfigurableArgs=""
226+
if [ ! -z "$cookiesFile" ]; then
227+
ytdlpConfigurableArgs='${ytdlpConfigurableArgs} --cookies "$cookiesFile '
228+
fi
229+
230+
if [ "$videoInfoJson" == "true" ]; then
231+
ytdlpConfigurableArgs='${ytdlpConfigurableArgs} --write-info-json '
232+
fi
233+
234+
225235
if echo "$1" | grep -i "youtube" | read; then
226236
if [ $videoContainer = mkv ]; then
227-
if [ ! -z "$cookiesFile" ]; then
228-
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"
229-
else
230-
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"
231-
fi
237+
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"
232238
if [ -f "$videoDownloadPath/incomplete/${2}${3}.mkv" ]; then
233239
chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mkv"
234240
downloadFailed=false
235241
else
236242
downloadFailed=true
237243
fi
238244
else
239-
if [ ! -z "$cookiesFile" ]; then
240-
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"
241-
else
242-
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"
243-
fi
245+
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"
244246
if [ -f "$videoDownloadPath/incomplete/${2}${3}.mp4" ]; then
245247
chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mp4"
246248
downloadFailed=false

lidarr/extended.conf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ preventRelatedArtistsLoop="true" # true = enabled :: This will prevent a
7070
##### VIDEO SCRIPT
7171
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
7272
videoFormat="bv[width>=1920]+ba" # ONLY CHANGE if you know what your doing, for guidence, please see yt-dlp documentation.
73+
videoInfoJson="false" # true = enabled :: Stores yt-dlp info-json files alongside video files.
7374
youtubeSubtitleLanguage="en" # Desired Language Code :: For guidence, please see yt-dlp documentation.
7475
disableImvd="false" # true = enabled :: Use this to disable IMVDB as a source, will result in only tidal videos
7576

0 commit comments

Comments
 (0)