This commit is contained in:
2026-02-14 20:39:33 -08:00
parent ae4880b164
commit 14871a1f02
3 changed files with 63 additions and 10 deletions

View File

@@ -1037,7 +1037,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}+ba"
selection_format_id = f"{selection_format_id}+bestaudio/best"
except Exception:
pass
@@ -1332,7 +1332,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}+ba"
selection_format_id = f"{format_id}+bestaudio/best"
except Exception:
selection_format_id = format_id
@@ -1572,8 +1572,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}+ba for audio")
actual_format = f"{actual_format}+ba"
debug(f"Selected video-only format {actual_format}; using {actual_format}+bestaudio/best for audio")
actual_format = f"{actual_format}+bestaudio/best"
except Exception as e:
pass
@@ -1718,7 +1718,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}+ba"
selection_format_id = f"{fallback_format}+bestaudio/best"
except Exception:
selection_format_id = fallback_format
@@ -1748,7 +1748,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}+ba"
selection_format_id = f"{format_id}+bestaudio/best"
except Exception:
selection_format_id = format_id
@@ -1823,7 +1823,7 @@ class Download_File(Cmdlet):
PipelineProgress(pipeline_context).step("awaiting selection")
log("Requested format is not available; select a working format with @N", file=sys.stderr)
return 0
return 1
raise