add "worst" format

This commit is contained in:
PikuZheng 2025-01-15 07:55:38 +08:00
parent ec38f905b4
commit a77f10541a
2 changed files with 3 additions and 1 deletions

View file

@ -35,7 +35,7 @@ def get_format(format: str, quality: str) -> str:
return "bestaudio/best"
# video {res} {vfmt} + audio {afmt} {res} {vfmt}
vfmt, afmt = ("[ext=mp4]", "[ext=m4a]") if format == "mp4" else ("", "")
vres = f"[height<={quality}]" if quality not in ("best", "best_ios") else ""
vres = f"[height<={quality}]" if quality not in ("best", "best_ios", "worst") else ""
vcombo = vres + vfmt
if quality == "best_ios":

View file

@ -20,6 +20,7 @@ export const Formats: Format[] = [
{ id: '1080', text: '1080p' },
{ id: '720', text: '720p' },
{ id: '480', text: '480p' },
{ id: 'worst', text: 'Worst' },
{ id: 'audio', text: 'Audio Only' },
],
},
@ -34,6 +35,7 @@ export const Formats: Format[] = [
{ id: '1080', text: '1080p' },
{ id: '720', text: '720p' },
{ id: '480', text: '480p' },
{ id: 'worst', text: 'Worst' },
],
},
{