Skip to content

Commit ac09aed

Browse files
committed
Revert "Disable autoplay for opened YouTube tracks"
This reverts commit d780a9a.
1 parent d780a9a commit ac09aed

4 files changed

Lines changed: 5 additions & 5 deletions

File tree

docs/tui-experience-spec.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Library searches healthy YouTube Cache Tracks and incomplete Cache Entries in on
4040

4141
Healthy and incomplete entries share the normal newest-first ordering, using the best available cache or file timestamp. Health status does not change an entry's rank, including in filtered results.
4242

43-
In Results, Enter invokes Play Now, `a` adds a healthy Track to the Queue, `N` moves/adds it to Play Next, `O` opens a healthy Track in YouTube's embedded player with autoplay disabled, `e` opens Rename Track for a healthy Track, `d` opens confirmed permanent deletion for a healthy Track or confirmed cleanup for an incomplete entry, and `/` focuses Search. Search filters live while typing; Enter or Esc transfers focus to Results without clearing the query, with Enter selecting the first match but never starting playback from the Search field. Playback, Queue, open, and rename actions are visibly disabled and omitted or dimmed in contextual help when the selected row is incomplete.
43+
In Results, Enter invokes Play Now, `a` adds a healthy Track to the Queue, `N` moves/adds it to Play Next, `O` opens a healthy Track's YouTube URL, `e` opens Rename Track for a healthy Track, `d` opens confirmed permanent deletion for a healthy Track or confirmed cleanup for an incomplete entry, and `/` focuses Search. Search filters live while typing; Enter or Esc transfers focus to Results without clearing the query, with Enter selecting the first match but never starting playback from the Search field. Playback, Queue, open, and rename actions are visibly disabled and omitted or dimmed in contextual help when the selected row is incomplete.
4444

4545
Rename Track is a centered modal text editor showing the current Track Title and a prefilled New name field. It trims leading and trailing whitespace, rejects an empty result, allows duplicate and Unicode titles, and supports insertion and paste at the cursor, Left/Right, Home/End, Backspace, and Delete. Enter persists the title and closes the modal, Esc cancels, and Ctrl+C retains the quit flow; other underlying shortcuts, including tab switching and playback, are suspended, so brackets are ordinary title characters. A write failure preserves the input and shows an error in the modal. Success immediately updates Library, Queue, Selected Track Preview, Now Playing, and the Last Queue Snapshot without interrupting playback; it retains the Cache Search query and shows a brief success notification. The Source Title remains internal metadata, while Track Identity, media filename, and Playback Locator are unchanged.
4646

src/open-external-url.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { execFile } from "node:child_process";
33
export type ExternalUrlOpener = (url: string) => Promise<void>;
44

55
export function youtubeTrackUrl(videoId: string): string {
6-
return `https://www.youtube.com/embed/${encodeURIComponent(videoId)}?autoplay=0`;
6+
return `https://www.youtube.com/watch?v=${encodeURIComponent(videoId)}`;
77
}
88

99
export const openExternalUrl: ExternalUrlOpener = async (url) => {

tests/open-external-url.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { describe, expect, test } from "vitest";
22
import { youtubeTrackUrl } from "../src/open-external-url";
33

44
describe("YouTube Track URLs", () => {
5-
test("derives a non-autoplaying embed URL from the Track stable ID", () => {
6-
expect(youtubeTrackUrl("abc_123-XYZ")).toBe("https://www.youtube.com/embed/abc_123-XYZ?autoplay=0");
5+
test("derives a canonical watch URL from the Track stable ID", () => {
6+
expect(youtubeTrackUrl("abc_123-XYZ")).toBe("https://www.youtube.com/watch?v=abc_123-XYZ");
77
});
88
});

tests/vue-tui.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,7 +869,7 @@ describe("TMU top-level surface smoke", () => {
869869
await terminal.stdin.write("]");
870870
await terminal.stdin.write("O");
871871

872-
expect(opened).toEqual(["https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=0"]);
872+
expect(opened).toEqual(["https://www.youtube.com/watch?v=dQw4w9WgXcQ"]);
873873
await terminal.stdin.write("\t");
874874
await terminal.stdin.write("O");
875875
expect(coordinator.uiState.library.query).toBe("O");

0 commit comments

Comments
 (0)