mirror of
https://github.com/ksyasuda/SubMiner.git
synced 2026-08-04 19:21:33 -07:00
fix(youtube): prevent playlist URLs from stalling yt-dlp probes (#180)
This commit is contained in:
@@ -4,6 +4,13 @@ import path from 'node:path';
|
||||
const DEFAULT_YTDLP_COMMAND = 'yt-dlp';
|
||||
const WINDOWS_YTDLP_COMMANDS = ['yt-dlp.cmd', 'yt-dlp.exe', 'yt-dlp'];
|
||||
|
||||
/**
|
||||
* yt-dlp expands `list=`/`index=` URL params into the whole playlist unless told not to, which
|
||||
* makes single-video extraction hang (e.g. a full Watch Later list) until our timeouts fire.
|
||||
* Every yt-dlp invocation targeting one video must include this.
|
||||
*/
|
||||
export const YTDLP_SINGLE_VIDEO_ARG = '--no-playlist';
|
||||
|
||||
function resolveFromPath(commandName: string): string | null {
|
||||
if (!process.env.PATH) {
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user