From 2371052d07c17175725a4425133b0f79fc96e1bf Mon Sep 17 00:00:00 2001 From: RandomNinjaAtk Date: Fri, 11 Aug 2023 13:55:25 +0000 Subject: [PATCH] v1.8 - Log yt-dlp output to loggin file #56 --- sonarr/YoutubeSeriesDownloader.service | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sonarr/YoutubeSeriesDownloader.service b/sonarr/YoutubeSeriesDownloader.service index b6f9d7f..0f5f731 100644 --- a/sonarr/YoutubeSeriesDownloader.service +++ b/sonarr/YoutubeSeriesDownloader.service @@ -1,5 +1,5 @@ #!/usr/bin/env bash -scriptVersion="1.7" +scriptVersion="1.8" ytdlpExtraOpts="--user-agent facebookexternalhit/1.1" scriptName="YoutubeSeriesDownloader" @@ -112,9 +112,11 @@ YoutubeSeriesDownloaderProcess () { fileName="$seriesTitleDots.S${episodeSeasonNumber}E${episodeNumber}.WEB-DL-SonarrExtended" log "$loopCount/$sonarrSeriesTotal :: $currentLoopIteration/$seriesEpisodeTvdbIdsCount :: $seriesTitle :: S${episodeSeasonNumber}E${episodeNumber} :: Downloading via yt-dlp ($videoFormat)..." if [ ! -z "$cookiesFile" ]; then - yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$downloadLocation/$fileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "$downloadUrl" + yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$downloadLocation/$fileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "$downloadUrl" 2>&1 | tee -a /config/logs/$scriptName.txt + fi else - yt-dlp -f "$videoFormat" --no-video-multistreams -o "$downloadLocation/$fileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "$downloadUrl" + yt-dlp -f "$videoFormat" --no-video-multistreams -o "$downloadLocation/$fileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "$downloadUrl" 2>&1 | tee -a /config/logs/$scriptName.txt + fi fi if python3 /usr/local/sma/manual.py --config "/config/extended/sma.ini" -i "$downloadLocation/$fileName.mkv" -nt; then