feat(roadmap): surface stale checkboxes + collection output-path setting
Command preview + incognito toggle were already wired end-to-end in the DownloadBar (Show command button, Incognito checkbox) — flipped the two stale ROADMAP.md checkboxes with notes; verified live in the preview. Output-path setting (PINCHFLAT): new Settings.collectionOutputTemplate — a raw yt-dlp -o template overriding the default Channel/Playlist/NNN-Title layout for Library downloads (empty = default). collectionOutputTemplate() takes an optional custom template (joined under outDir, left for yt-dlp to expand); download.ts passes the setting; zod schema validates it as a safe relative template; Settings -> Filenames field. Tests in buildArgs + settingsSchema; live-verified the field renders. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -200,10 +200,17 @@ export function buildCommand(opts: StartDownloadOptions, cookiesFile?: string):
|
||||
const perKindDir = (opts.kind === 'audio' ? settings.audioFolder : settings.videoFolder)?.trim()
|
||||
const outDir = safeOverride || perKindDir || getDefaultMediaDir(opts.kind)
|
||||
// A collection (media-manager) download is filed into <channel>/<playlist>/
|
||||
// <NNN> - <title> folders; an ordinary download uses the flat filenameTemplate.
|
||||
// <NNN> - <title> folders by default, or into a power-user's raw yt-dlp `-o`
|
||||
// layout (Settings.collectionOutputTemplate); an ordinary download uses the
|
||||
// flat filenameTemplate.
|
||||
const filenameTemplate = settings.filenameTemplate?.trim() || '%(title)s.%(ext)s'
|
||||
const outputTemplate = opts.collection
|
||||
? collectionOutputTemplate(outDir, opts.collection, '%(title)s.%(ext)s')
|
||||
? collectionOutputTemplate(
|
||||
outDir,
|
||||
opts.collection,
|
||||
'%(title)s.%(ext)s',
|
||||
settings.collectionOutputTemplate
|
||||
)
|
||||
: join(outDir, filenameTemplate)
|
||||
// Per-download override wins; otherwise use the persisted defaults.
|
||||
const options = opts.options ?? settings.downloadOptions
|
||||
|
||||
Reference in New Issue
Block a user