Skip to content

Play YouTube, SoundCloud, and Mixcloud links directly - #1

Merged
sethmills21 merged 2 commits into
mainfrom
feat/url-playback
Oct 16, 2026
Merged

sethmills21 merged 2 commits into
mainfrom
feat/url-playback

Conversation

@sethmills21

Copy link
Copy Markdown
Owner

Paste a YouTube, SoundCloud, or Mixcloud URL into sonic and it plays. This has run locally since September but never reached main.

  • `sonic ""` plays a single track or loads a whole playlist
  • A watch link with a dead `list=` falls back to the single track
  • `--help` documents link playback and quoting
  • Repo guidance moves from CLAUDE.md to AGENTS.md

Tested: on the Mac Studio, `npm run check` passes, the TUI renders and quits clean, search returns results on all three sources, a YouTube watch URL resolves, and mpv streams it (yt-dlp 2026.08.19, mpv 0.41.0).

Not done: `bash/agents-md-only` is superseded by this and would delete link playback if merged. Spotify source (`chef/2026-03-07-spotify`) is still unmerged.

🤖 Generated with Claude Code

Seth Miller and others added 2 commits August 31, 2026 11:02
Pasting a URL previously fell through to `ytsearch5:<url>`, so a link
searched for its own text instead of playing.

- add parseSourceUrl() and resolveUrl() to the search adapter: playlists
  resolve with --yes-playlist, single tracks with --no-playlist, and a
  watch URL carrying a dead list= falls back to the linked video
- trim yt-dlp's multi-line diagnostics to the one line worth showing
- branch doSearch() to the link path, extracting the loader spinner into
  a shared runWithLoader() rather than duplicating it
- document the URL form and the shell-quoting caveat in help

Verified against a live link: resolves to the track, streams through mpv
with playback-time advancing and duration matching.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WqTzyMAtea218cjQsXcHG3
@sethmills21
sethmills21 merged commit 31d816f into main Oct 16, 2026
@sethmills21
sethmills21 deleted the feat/url-playback branch October 16, 2026 14:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant