diff --git a/CODE-AUDIT.md b/CODE-AUDIT.md index bf2c262..adf1ce9 100644 --- a/CODE-AUDIT.md +++ b/CODE-AUDIT.md @@ -495,7 +495,7 @@ token system + shared primitives (UI/SIMP — high value, larger effort) · i18n hand-synced color constants (a "keep in sync" comment guards them). - [x] **L60 — `'external-url'` channel name lacks the `category:` prefix** every other IPC channel uses. - [x] **L61 — `taskbarProgress` is the lone `ipcMain.on`** (fire-and-forget) amid all-`invoke` channels. -- [ ] **L62 — "Best available" synthetic format hardcodes `ext:'mp4'`/`hasAudio:true`** (probe.ts) — +- [x] **L62 — "Best available" synthetic format hardcodes `ext:'mp4'`/`hasAudio:true`** (probe.ts) — mislabels when the chosen container is mkv/webm. - [x] **L63 — `audioQuality()` unknown label → silent `'0'` (best)** — the audio analog of H5. - [ ] **L64 — `ARIA2C_ARGS` connection params hardcoded** (`-x16 -s16 -k1M`), no user control. diff --git a/src/main/probe.ts b/src/main/probe.ts index 3bef06e..266ceb3 100644 --- a/src/main/probe.ts +++ b/src/main/probe.ts @@ -69,7 +69,10 @@ function buildVideoFormats(raw: RawFormat[]): FormatOption[] { const options = [...bestByHeight.values()] .sort((a, b) => (b.height ?? 0) - (a.height ?? 0)) .map(toOption) - options.unshift({ id: BEST_FORMAT_ID, label: 'Best available', ext: 'mp4', hasAudio: true }) + // No `ext`: the final container for the auto-best pick depends on the user's + // videoContainer setting (mp4/mkv/webm), unknown here -- claiming 'mp4' would + // mislabel mkv/webm outputs (L62). hasAudio is always true (best merges audio). + options.unshift({ id: BEST_FORMAT_ID, label: 'Best available', hasAudio: true }) return options }