From 1d1c386fcd81a6c0931e59b1153eae6e22ceb89e Mon Sep 17 00:00:00 2001 From: Atsushi2965 <142886283+atsushi2965@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:27:19 +0900 Subject: [PATCH 1/2] `presets` conform to best practices of yt-dlp (almost refactoring) --- core/iframe/ui.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/iframe/ui.js b/core/iframe/ui.js index 4b35ced..937c17a 100644 --- a/core/iframe/ui.js +++ b/core/iframe/ui.js @@ -13,11 +13,17 @@ function uilog(message) { // presets, always expandable. they map to yt-dlp options const presets = { "Best": {}, - "Audio": { - "format": "bestaudio" + "Audio": { // -x + "format": "ba/b", + "postprocessors": [{ + "key": "FFmpegExtractAudio", + "nopostoverwrites": false, + "preferredcodec": "best", + "preferredquality": "5" + }] }, - "Smallest": { - "format_sort": ["+size", "+br"] + "Smallest": { // https://github.com/yt-dlp/yt-dlp#format-selection + "format_sort": ["+size", "+br", "+res", "+fps"] }, }; From d0e1728b5ee11015e7a28ded6afbea42a1bef009 Mon Sep 17 00:00:00 2001 From: Atsushi2965 <142886283+atsushi2965@users.noreply.github.com> Date: Tue, 20 Jan 2026 17:36:05 +0900 Subject: [PATCH 2/2] Add `-f best` for 'Smallest' option --- core/iframe/ui.js | 1 + 1 file changed, 1 insertion(+) diff --git a/core/iframe/ui.js b/core/iframe/ui.js index 937c17a..a6aec95 100644 --- a/core/iframe/ui.js +++ b/core/iframe/ui.js @@ -23,6 +23,7 @@ const presets = { }] }, "Smallest": { // https://github.com/yt-dlp/yt-dlp#format-selection + "format": "b", "format_sort": ["+size", "+br", "+res", "+fps"] }, };