Fix L62: drop hardcoded ext:'mp4' from the synthetic "Best available" format
The auto-best format option claimed ext:'mp4', but the real output container for the best pick depends on the user's videoContainer setting (mp4/mkv/webm), so it mislabeled mkv/webm outputs. ext is optional on FormatOption and the option's label is the fixed "Best available", so the field is simply omitted. hasAudio:true is kept (the best pick always merges an audio track). typecheck + 242 tests + eslint green. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -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).
|
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] **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.
|
- [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.
|
mislabels when the chosen container is mkv/webm.
|
||||||
- [x] **L63 — `audioQuality()` unknown label → silent `'0'` (best)** — the audio analog of H5.
|
- [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.
|
- [ ] **L64 — `ARIA2C_ARGS` connection params hardcoded** (`-x16 -s16 -k1M`), no user control.
|
||||||
|
|||||||
+4
-1
@@ -69,7 +69,10 @@ function buildVideoFormats(raw: RawFormat[]): FormatOption[] {
|
|||||||
const options = [...bestByHeight.values()]
|
const options = [...bestByHeight.values()]
|
||||||
.sort((a, b) => (b.height ?? 0) - (a.height ?? 0))
|
.sort((a, b) => (b.height ?? 0) - (a.height ?? 0))
|
||||||
.map(toOption)
|
.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
|
return options
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user