From a77f10541adaed40762d25e679438126785ffc6d Mon Sep 17 00:00:00 2001 From: PikuZheng Date: Wed, 15 Jan 2025 07:55:38 +0800 Subject: [PATCH] add "worst" format --- app/dl_formats.py | 2 +- ui/src/app/formats.ts | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/dl_formats.py b/app/dl_formats.py index 8abd0386..5640ca48 100644 --- a/app/dl_formats.py +++ b/app/dl_formats.py @@ -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": diff --git a/ui/src/app/formats.ts b/ui/src/app/formats.ts index 0e283dd3..3e79ec1b 100644 --- a/ui/src/app/formats.ts +++ b/ui/src/app/formats.ts @@ -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' }, ], }, {