v0.2.17: Add yt-dlp HTTP headers support (--add-header)

- Pass headers dict to yt-dlp as --add-header arguments
- Move 'linkkf' from ffmpeg_hls to ytdlp_aria2 downloader mapping
- Fix Linkkf CDN redirect issue (Referer header required)
This commit is contained in:
2026-01-08 01:30:29 +09:00
parent ace56dfd73
commit 5afb082692
4 changed files with 12 additions and 3 deletions

View File

@@ -98,6 +98,11 @@ class YtdlpAria2Downloader(BaseDownloader):
# 프록시
if options.get('proxy'):
cmd.extend(['--proxy', options['proxy']])
# HTTP 헤더 추가 (Referer 등 - Linkkf 등 리다이렉트 방지용)
if options.get('headers'):
for key, value in options['headers'].items():
cmd.extend(['--add-header', f'{key}:{value}'])
# FFmpeg 경로 자동 감지 및 설정
ffmpeg_path = options.get('ffmpeg_path') or P.ModelSetting.get('ffmpeg_path')