Allow yt-dlp supported platforms to use auto-synced lyrics(timestamped) - #289
Allow yt-dlp supported platforms to use auto-synced lyrics(timestamped)#289Ivyson wants to merge 5 commits into
Conversation
Fetches first 20 tracks from YT music when list=URL is parsed and plays,remaining tracks are fetched in the background and added in batches of 20. Added the --expand-playlist/--no-expand-playlist CLI flags and the expand_playlist key in the configs. This is switched on by default
📝 WalkthroughWalkthroughThe PR serializes gapless pipeline swaps, adds regression coverage for track selection races, enables lyric synchronization for finite-duration yt-dlp tracks, updates lyric documentation, and reformats the root CLI command declaration. ChangesPlayback and lyric behavior
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/lyrics.md`:
- Line 7: Update the “Synced lyrics” documentation text to hyphenate “auto
scroll” as “auto-scroll,” preserving the surrounding wording and behavior
description.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 5d392513-4113-4efc-b753-03a74fc02a01
📒 Files selected for processing (7)
commands.godocs/lyrics.mdplayer/gapless.goplayer/gapless_test.goplayer/player.goui/model/lyrics.goui/model/lyrics_test.go
|
|
||
| - **Synced lyrics**: for local files and Navidrome tracks, lyrics auto scroll and highlight the active line in time with playback. | ||
| - **Scroll mode**: for streams and plain lyrics without timestamps, use `j`/`k` or arrow keys to scroll manually. | ||
| - **Synced lyrics**: for local files, Navidrome tracks, and YouTube/yt-dlp tracks with a known duration, lyrics auto scroll and highlight the active line in time with playback. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Hyphenate "auto scroll".
Use "auto-scroll" as a compound adjective/verb before "and highlight."
✏️ Proposed fix
-- **Synced lyrics**: for local files, Navidrome tracks, and YouTube/yt-dlp tracks with a known duration, lyrics auto scroll and highlight the active line in time with playback.
+- **Synced lyrics**: for local files, Navidrome tracks, and YouTube/yt-dlp tracks with a known duration, lyrics auto-scroll and highlight the active line in time with playback.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - **Synced lyrics**: for local files, Navidrome tracks, and YouTube/yt-dlp tracks with a known duration, lyrics auto scroll and highlight the active line in time with playback. | |
| - **Synced lyrics**: for local files, Navidrome tracks, and YouTube/yt-dlp tracks with a known duration, lyrics auto-scroll and highlight the active line in time with playback. |
🧰 Tools
🪛 LanguageTool
[grammar] ~7-~7: Use a hyphen to join words.
Context: ...racks with a known duration, lyrics auto scroll and highlight the active line in ...
(QB_NEW_EN_HYPHEN)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/lyrics.md` at line 7, Update the “Synced lyrics” documentation text to
hyphenate “auto scroll” as “auto-scroll,” preserving the surrounding wording and
behavior description.
Source: Linters/SAST tools
|
Didn't it work as expected? |
|
The update works ( at least on my machine), I closed the pr because I figured it has two changes in it, the Lyrics update + The race condition for track handing over. I wanted to make two separate PRs so that they can be reviewed properly. |
Summary
Support for synced lyrics on YouTube Music and other
yt-dlptracks.Until now, synced (auto-scrolling, timestamped) lyrics only worked for local files and Navidrome. YouTube/
yt-dlptracks were always forced into manual scroll mode ; even though timestamped LRC was already being fetched from LRCLIB/NetEase. The exclusion relied on a stale comment claimingyt-dlpstreams report position 0; in reality, position has been tracked from decoded PCM frames since from March.This PR lets
yt-dlptracks with a known duration use synced lyrics: the active line auto-scrolls and highlights in time with playback, including after seeking. Streams without a finite duration (e.xx. YouTube Live) stay in scroll mode, since their position isn't song-relative.This was confirmed to be working using
yt-dlpversion: 2026.07.04ffmpeg: "8.1.2 "Screenshots / video
Before change
After Changes
How to test
make build && ./cliamp "https://soundcloud.com/j-cole/power-trip-feat-miguel-1?utm_source=clipboard&utm_medium=text&utm_campaign=social_sharing"Checklist
make checkpassesdocs/andsite/index.htmlupdated for user-facing changesSummary by CodeRabbit