-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitch.ps1
30 lines (26 loc) · 1003 Bytes
/
twitch.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
$Config = Get-Content -Raw "$PSScriptRoot/Config.json5" | ConvertFrom-Json
$Command = @(
'--downloader', 'aria2c',
'--downloader-args', "--continue --max-concurrent-downloads=16 --max-connection-per-server=16 --split=16 --min-split-size=5M",
'--force-ipv4',
'--keep-video' # THIS COMMA IS PURPOSFULLY MISSING!!
$Config.AlwaysUseCookiesFile ? ('--cookies', $Config.CookiesFilePath) : ('--cookies-from-browser', $Config.CookiesBrowser),
'--ignore-errors',
'--no-continue',
'--no-overwrites',
'--add-metadata',
'--write-description',
'--write-info-json',
'--write-annotations',
'--write-thumbnail',
'--embed-thumbnail',
'--all-subs',
'--embed-subs',
'--get-comments',
'--check-formats',
'--concurrent-fragments', $Config.MediaConcurrentFragments,
'--output', "$($Config.OutputBase)/$($Config.YTDLPOutputFormat)",
'--throttled-rate', '100K' # THIS COMMA IS PURPOSFULLY MISSING!!
$args
)
yt-dlp @Command *>&1