private serverService: ServerService,
private redirectService: RedirectService,
private themeService: ThemeService,
- private hotkeysService: HotkeysService
+ private hotkeysService: HotkeysService
) {}
ngOnInit () {
thumbnailUrl?: string
}
+const processOptions = {
+ maxBuffer: 1024 * 1024 * 10 // 10MB
+}
+
function getYoutubeDLInfo (url: string, opts?: string[]): Promise<YoutubeDLInfo> {
return new Promise<YoutubeDLInfo>(async (res, rej) => {
const options = opts || [ '-j', '--flat-playlist' ]
return new Promise<string>(async (res, rej) => {
const youtubeDL = await safeGetYoutubeDL()
- youtubeDL.exec(url, options, err => {
+ youtubeDL.exec(url, options, processOptions, err => {
if (err) return rej(err)
return res(path)