commit 15355a042b774ec116542f9dfc02f2bbc2d16ba7
parent 972118b0765ed111cd1a377ea5b9a761ae9155cc
Author: I Mean I'm Just Saying <imeanimjustsaying@kiwifarms.st>
Date: Wed, 11 Nov 2026 06:16:16 -0500
local media: a new Local Archive channel leaves playback off
Review s3. The contributed new-channel path wrote `localMedia.playback: true`,
so every Local Archive channel started with playback granted. Serving
originals is its own opt-in (slice 4); creation now writes only the library
id and directory, and the form no longer says playback starts enabled.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat:
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/editor/app/channels/components/ChannelForm.tsx b/editor/app/channels/components/ChannelForm.tsx
@@ -415,7 +415,7 @@ export function ChannelForm({
<p className="text-xs text-muted-foreground">
After creation, preview matching MP4, .info.json and .vtt files and
select recordings to import. Subdirectories are not scanned. Originals
- stay in place. Local video playback starts enabled; you can turn it off on the library page.
+ stay in place.
</p>
</>
) : (
diff --git a/editor/app/channels/lib/prepareLocalArchiveChannel.test.ts b/editor/app/channels/lib/prepareLocalArchiveChannel.test.ts
@@ -17,12 +17,13 @@ async function fixture(t: TestContext) {
return { root, directory, paths, form };
}
-test("local creation enables playback by default and ignores stale online fields; preparation writes nothing", async t => {
+test("local creation leaves playback off and ignores stale online fields; preparation writes nothing", async t => {
const f = await fixture(t);
await writeFile(path.join(f.directory, "original.mp4"), "original bytes");
for (const [key,value] of Object.entries({url:"https://example.com/account", platform:"twitter", sourceKind:"social", handling:"transcribe", fetchPostsNow:"on", fetchPlaylist:"on", prioritizeDownload:"on", syncIntervalMinutes:"1"})) f.form.set(key,value);
const result = await prepareLocalArchiveChannel(f.paths, f.form);
- assert.deepEqual(result, { name:"Example", slug:"", config:{name:"Example", handling:"youtube", sourceKind:"video", localMedia:{sourceId:"library-1",directory:f.directory,playback:true}, syncIntervalMinutes:0,fullSweepIntervalMinutes:0} });
+ assert.deepEqual(result, { name:"Example", slug:"", config:{name:"Example", handling:"youtube", sourceKind:"video", localMedia:{sourceId:"library-1",directory:f.directory}, syncIntervalMinutes:0,fullSweepIntervalMinutes:0}, warnings:[] });
+ assert.equal("playback" in result.config.localMedia!, false);
assert.deepEqual(await readdir(f.root), ["library"]);
assert.equal(await readFile(path.join(f.directory,"original.mp4"),"utf8"),"original bytes");
});
diff --git a/editor/app/channels/lib/prepareLocalArchiveChannel.ts b/editor/app/channels/lib/prepareLocalArchiveChannel.ts
@@ -32,7 +32,7 @@ export async function prepareLocalArchiveChannel(paths: Paths, form: FormData):
const localMedia = coerceLocalMediaConfig({
sourceId: String(form.get("localSourceId") ?? "").trim(),
directory: String(form.get("localDirectory") ?? "").trim(),
- playback: true,
+ // Playback is never on by default: serving originals is its own opt-in.
});
if (!localMedia || !path.isAbsolute(localMedia.directory)) {
throw new Error("Enter a valid library ID and an absolute directory on the editor server");