f
This commit is contained in:
@@ -999,9 +999,18 @@ class YtDlpTool:
|
||||
pass
|
||||
|
||||
if ytdl_format and opts.mode != "audio":
|
||||
resolved = self.resolve_height_selector(ytdl_format)
|
||||
if resolved:
|
||||
ytdl_format = resolved
|
||||
# Don't resolve 3-digit format IDs (like 251, 249, 140 from YouTube format tables) as heights
|
||||
# YouTube format IDs are typically 2-3 digits representing specific codec/quality combinations
|
||||
# Height selectors come from user input like "720" or "1080p"
|
||||
is_likely_format_id = (
|
||||
isinstance(ytdl_format, str) and
|
||||
len(ytdl_format.strip()) == 3 and
|
||||
ytdl_format.strip().isdigit()
|
||||
)
|
||||
if not is_likely_format_id:
|
||||
resolved = self.resolve_height_selector(ytdl_format)
|
||||
if resolved:
|
||||
ytdl_format = resolved
|
||||
|
||||
fmt = ytdl_format or self.default_format(opts.mode)
|
||||
base_options["format"] = fmt
|
||||
|
||||
Reference in New Issue
Block a user