removed TUI and others

This commit is contained in:
2026-05-14 20:47:20 -07:00
parent 036977832b
commit 717cb13dda
31 changed files with 378 additions and 7790 deletions
+27
View File
@@ -4608,6 +4608,25 @@ function M._raw_format_selection_id(fmt)
return display_id
end
function M._raw_info_has_audio_variant_selectors(raw)
if type(raw) ~= 'table' or type(raw.formats) ~= 'table' then
return false
end
for _, fmt in ipairs(raw.formats) do
if type(fmt) == 'table' then
local format_id = trim(tostring(fmt.format_id or ''))
local vcodec = tostring(fmt.vcodec or 'none')
local acodec = tostring(fmt.acodec or 'none')
if format_id:match('^%d+%-%w+$') and vcodec == 'none' and acodec ~= 'none' then
return true
end
end
end
return false
end
function M._raw_format_picker_score(fmt)
local note = trim(tostring(fmt and (fmt.format_note or fmt.format) or '')):lower()
local format_id = trim(tostring(fmt and fmt.format_id or '')):lower()
@@ -4715,6 +4734,14 @@ local function _cache_formats_from_raw_info(url, raw, source_label)
return nil, 'missing url'
end
if raw == nil then
raw = mp.get_property_native('ytdl-raw-info')
end
if M._raw_info_has_audio_variant_selectors(raw) then
return nil, 'raw info requires validated probe'
end
local tbl, err = _build_formats_table_from_raw_info(url, raw)
if type(tbl) ~= 'table' or type(tbl.rows) ~= 'table' then
return nil, err or 'raw format conversion failed'