v2.1 - write log data to the correct file

This commit is contained in:
RandomNinjaAtk
2024-08-08 14:39:57 -04:00
committed by GitHub
parent f9e9cc6d87
commit 8d9271f31d

View File

@@ -1,5 +1,5 @@
#!/usr/bin/env bash
scriptVersion="2.0"
scriptVersion="2.1"
ytdlpExtraOpts="--user-agent facebookexternalhit/1.1"
scriptName="YoutubeSeriesDownloader"
@@ -112,9 +112,9 @@ 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" 2>&1 | tee -a /config/logs/$scriptName.txt
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/$logFileName
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" 2>&1 | tee -a /config/logs/$scriptName.txt
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/$logFileName
fi
if python3 /config/extended/sma/manual.py --config "/config/extended/sma.ini" -i "$downloadLocation/$fileName.mkv" -nt; then