always use yt-dlp wrapper

This commit is contained in:
j 2025-03-19 13:55:54 +01:00
parent 438271a3f2
commit 95272d4df2

View file

@ -143,8 +143,8 @@ def download(item_id, url, referer=None):
has_audio = bool([fmt for fmt in formats['formats'] if fmt['resolution'] == 'audio only'])
has_video = bool([fmt for fmt in formats['formats'] if 'x' in fmt['resolution']])
cmd = [
'yt-dlp', '-q', url,
cmd = YT_DLP + [
'-q', url,
'-o', '%(title)80s.%(ext)s'
]
if referer:
@ -167,8 +167,8 @@ def download(item_id, url, referer=None):
stderr=subprocess.PIPE, close_fds=True)
stdout, stderr = p.communicate()
if stderr and b'Requested format is not available.' in stderr:
cmd = [
'yt-dlp', '-q', url,
cmd = YT_DLP + [
'-q', url,
'-o', '%(title)80s.%(ext)s'
]
if referer: