Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions lidarr/Video.service.bash
Original file line number Diff line number Diff line change
Expand Up @@ -226,17 +226,22 @@ DownloadVideo () {
ytdlpConfigurableArgs="$ytdlpConfigurableArgs --write-info-json "
fi

ytdlpMaxFileSize=""
if [ "${extrasMaxFileSize::-1}" -gt 0 ]; then
ytdlpMaxFileSize+="--max-filesize $extrasMaxFileSize"
fi

if echo "$1" | grep -i "youtube" | read; then
if [ $videoContainer = mkv ]; then
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"
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 $ytdlpMaxFileSize --no-mtime --geo-bypass "$1"
if [ -f "$videoDownloadPath/incomplete/${2}${3}.mkv" ]; then
chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mkv"
downloadFailed=false
else
downloadFailed=true
fi
else
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"
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 $ytdlpMaxFileSize --no-mtime --geo-bypass "$1"
if [ -f "$videoDownloadPath/incomplete/${2}${3}.mp4" ]; then
chmod 666 "$videoDownloadPath/incomplete/${2}${3}.mp4"
downloadFailed=false
Expand Down
8 changes: 6 additions & 2 deletions radarr/Extras.bash
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,15 @@ do
mkdir -p "$tempFolder"
fi

ytdlpMaxFileSize=""
if [ "${extrasMaxFileSize::-1}" -gt 0 ]; then
ytdlpMaxFileSize+="--max-filesize $extrasMaxFileSize"
fi
log "$itemTitle :: $i of $tmdbVideosListDataIdsCount :: $tmdbExtraType :: $tmdbExtraTitle ($tmdbExtraKey) :: Downloading (yt-dlp :: $videoFormat)..."
if [ ! -z "$cookiesFile" ]; then
yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "https://www.youtube.com/watch?v=$tmdbExtraKey"
yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts $ytdlpMaxFileSize "https://www.youtube.com/watch?v=$tmdbExtraKey"
else
yt-dlp -f "$videoFormat" --no-video-multistreams -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "https://www.youtube.com/watch?v=$tmdbExtraKey"
yt-dlp -f "$videoFormat" --no-video-multistreams -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts $ytdlpMaxFileSize "https://www.youtube.com/watch?v=$tmdbExtraKey"
fi
if [ -f "$tempFolder/$finalFileName.mkv" ]; then
log "$itemTitle :: $i of $tmdbVideosListDataIdsCount :: $tmdbExtraType :: $tmdbExtraTitle ($tmdbExtraKey) :: Compete"
Expand Down
9 changes: 7 additions & 2 deletions sonarr/Extras.bash
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,16 @@ DownloadExtras () {
mkdir -p "$tempFolder"
fi

ytdlpMaxFileSize=""
if [ "${extrasMaxFileSize::-1}" -gt 0 ]; then
ytdlpMaxFileSize+="--max-filesize $extrasMaxFileSize"
fi

log "$itemTitle :: $i of $tmdbVideosListDataIdsCount :: $tmdbExtraType :: $tmdbExtraTitle ($tmdbExtraKey) :: Downloading (yt-dlp :: $videoFormat)..."
if [ ! -z "$cookiesFile" ]; then
yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "https://www.youtube.com/watch?v=$tmdbExtraKey" 2>&1 | tee -a /config/logs/$scriptName.txt
yt-dlp -f "$videoFormat" --no-video-multistreams --cookies "$cookiesFile" -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts $ytdlpMaxFileSize "https://www.youtube.com/watch?v=$tmdbExtraKey" 2>&1 | tee -a /config/logs/$scriptName.txt
else
yt-dlp -f "$videoFormat" --no-video-multistreams -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts "https://www.youtube.com/watch?v=$tmdbExtraKey" 2>&1 | tee -a /config/logs/$scriptName.txt
yt-dlp -f "$videoFormat" --no-video-multistreams -o "$tempFolder/$finalFileName" --write-sub --sub-lang $videoLanguages --embed-subs --merge-output-format mkv --no-mtime --geo-bypass $ytdlpExtraOpts $ytdlpMaxFileSize "https://www.youtube.com/watch?v=$tmdbExtraKey" 2>&1 | tee -a /config/logs/$scriptName.txt
fi
if [ -f "$tempFolder/$finalFileName.mkv" ]; then
log "$itemTitle :: $i of $tmdbVideosListDataIdsCount :: $tmdbExtraType :: $tmdbExtraTitle ($tmdbExtraKey) :: Compete"
Expand Down
2 changes: 1 addition & 1 deletion sonarr/extended.conf
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ configureNaming="false"
extrasLanguages="en-US" # Set the desired language for Extras, all languages will be processed... (this is a "," separated list of TMDB language codes, get the code from there sites language opitons, example: en-US)
extrasType="all" # all or trailers :: all downloads all available videos (trailers, clips, featurette, etc...) :: trailers only downloads trailers
extrasOfficialOnly="false" # true = enabled :: Skips extras that are not considered/marked as Official from TMDB site.

extrasMaxFileSize="" # Set the max filesize for downloaded extras. Syntax: 100M for 100 megabytes, 1G for 1 gigabyte, 100K for 100 kilobytes, etc. See --max-filesize: https://github.com/yt-dlp/yt-dlp#video-selection
##### DailySeriesEpisodeTrimmer SCRIPT
maximumDailyEpisodes="7" # number of episodes to keep when using DailySeriesEpisodeTrimmer script
sonarrSeriesEpisodeTrimmerTag="" # set to a single sonarr series tag (case sensitive). This allows the script to process non-daily series type series that have a matching tag. For non-daily series, the entire season is kept and the maximum episodes setting is ignored.
Expand Down