update
This commit is contained in:
@@ -1044,7 +1044,7 @@ class Download_File(Cmdlet):
|
||||
vcodec = str(chosen.get("vcodec", "none"))
|
||||
acodec = str(chosen.get("acodec", "none"))
|
||||
if vcodec != "none" and acodec == "none":
|
||||
selection_format_id = f"{selection_format_id}+bestaudio/best"
|
||||
selection_format_id = f"{selection_format_id}+bestaudio"
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
@@ -1339,7 +1339,7 @@ class Download_File(Cmdlet):
|
||||
selection_format_id = format_id
|
||||
try:
|
||||
if vcodec != "none" and acodec == "none" and format_id:
|
||||
selection_format_id = f"{format_id}+bestaudio/best"
|
||||
selection_format_id = f"{format_id}+bestaudio"
|
||||
except Exception:
|
||||
selection_format_id = format_id
|
||||
|
||||
@@ -1485,7 +1485,7 @@ class Download_File(Cmdlet):
|
||||
actual_playlist_items = None
|
||||
|
||||
if mode == "audio" and not actual_format:
|
||||
actual_format = "bestaudio/best"
|
||||
actual_format = "bestaudio"
|
||||
|
||||
if mode == "video" and not actual_format:
|
||||
configured = (ytdlp_tool.default_format("video") or "").strip()
|
||||
@@ -1514,7 +1514,7 @@ class Download_File(Cmdlet):
|
||||
and isinstance(actual_format, str)
|
||||
and actual_format == "audio"
|
||||
):
|
||||
actual_format = "bestaudio/best"
|
||||
actual_format = "bestaudio"
|
||||
|
||||
# DEBUG: Render config panel for tracking pipeline state
|
||||
if is_debug_enabled():
|
||||
@@ -1553,8 +1553,8 @@ class Download_File(Cmdlet):
|
||||
and not forced_single_applied
|
||||
and actual_format not in {"best", "bestaudio", "bw", "ba"}
|
||||
):
|
||||
debug(f"Appending fallback to specific audio format: {actual_format} -> {actual_format}/bestaudio/best")
|
||||
actual_format = f"{actual_format}/bestaudio/best"
|
||||
debug(f"Appending fallback to specific audio format: {actual_format} -> {actual_format}/bestaudio")
|
||||
actual_format = f"{actual_format}/bestaudio"
|
||||
|
||||
if (
|
||||
actual_format
|
||||
@@ -1579,8 +1579,8 @@ class Download_File(Cmdlet):
|
||||
vcodec = str(fmt_match.get("vcodec", "none"))
|
||||
acodec = str(fmt_match.get("acodec", "none"))
|
||||
if vcodec != "none" and acodec == "none":
|
||||
debug(f"Selected video-only format {actual_format}; using {actual_format}+bestaudio/best for audio")
|
||||
actual_format = f"{actual_format}+bestaudio/best"
|
||||
debug(f"Selected video-only format {actual_format}; using {actual_format}+bestaudio for audio")
|
||||
actual_format = f"{actual_format}+bestaudio"
|
||||
except Exception as e:
|
||||
pass
|
||||
|
||||
@@ -1725,7 +1725,7 @@ class Download_File(Cmdlet):
|
||||
vcodec = str(only.get("vcodec", "none"))
|
||||
acodec = str(only.get("acodec", "none"))
|
||||
if vcodec != "none" and acodec == "none" and fallback_format:
|
||||
selection_format_id = f"{fallback_format}+bestaudio/best"
|
||||
selection_format_id = f"{fallback_format}+bestaudio"
|
||||
except Exception:
|
||||
selection_format_id = fallback_format
|
||||
|
||||
@@ -1755,7 +1755,7 @@ class Download_File(Cmdlet):
|
||||
selection_format_id = format_id
|
||||
try:
|
||||
if vcodec != "none" and acodec == "none" and format_id:
|
||||
selection_format_id = f"{format_id}+bestaudio/best"
|
||||
selection_format_id = f"{format_id}+bestaudio"
|
||||
except Exception:
|
||||
selection_format_id = format_id
|
||||
|
||||
@@ -2089,9 +2089,9 @@ class Download_File(Cmdlet):
|
||||
except Exception:
|
||||
height_selector = None
|
||||
if query_wants_audio:
|
||||
# Explicit `format:audio` must always force bestaudio fallback chain
|
||||
# Explicit `format:audio` must always force bestaudio selection
|
||||
# and avoid format-list/selector ambiguity.
|
||||
ytdl_format = "bestaudio/best"
|
||||
ytdl_format = "bestaudio"
|
||||
elif height_selector:
|
||||
ytdl_format = height_selector
|
||||
elif query_format:
|
||||
@@ -2473,7 +2473,7 @@ class Download_File(Cmdlet):
|
||||
else:
|
||||
chosen_format = None
|
||||
if mode == "audio":
|
||||
chosen_format = "bestaudio/best"
|
||||
chosen_format = "bestaudio"
|
||||
|
||||
opts = DownloadOptions(
|
||||
url=url_str,
|
||||
|
||||
Reference in New Issue
Block a user