Skip to content

Use LRCLIB for lyrics with time-synced playback UI - #2

Draft
lasangainc wants to merge 4 commits into
mainfrom
cursor/lrclib-synced-lyrics-b7bd
Draft

Use LRCLIB for lyrics with time-synced playback UI#2
lasangainc wants to merge 4 commits into
mainfrom
cursor/lrclib-synced-lyrics-b7bd

Conversation

@lasangainc

@lasangainc lasangainc commented May 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • Replaced Genius HTML scraping with the public LRCLIB API: GET /api/get using track title, artist, album, and duration (seconds), with GET /api/search as a fallback when there is no exact signature match.
  • Sends the recommended User-Agent header (Lightify/<version> (wss.Lightify)).
  • Mini player lyrics now receive Spotify albumName, durationMs, and live positionMs / isPlaying so LRCLIB can match tracks and the UI can stay in sync with playback.

UI

  • Minimal synced lyrics: SF default (non-rounded) typography; only the current line is sharp and semibold; other lines use blur + reduced opacity (no glow, capsule, or shimmer). Edge mask kept soft. LRCLIB attribution chip removed from the lyrics column.
  • Plain (unsynced) lyrics: Same default font family, off-center lines blurred, no chip.
  • No lyrics: LRCLIB not found, network/other fetch failure, or empty/instrumental-with-no-text → centered ... placeholder. Loading shows a small ProgressView only.

Removed

  • GeniusLyricsService and the Genius folder (HTML/DOM parsing path).

Build fixes

  • Shimmer uses TimelineView(.periodic(from:by:)) with TimeInterval instead of animation(minimumInterval: .milliseconds(…)), which did not compile on the project SDK.
  • Removed redundant await on synchronous ArtworkPipeline cache writes.
Open in Web Open in Cursor 

cursoragent and others added 4 commits May 9, 2026 21:11
- Add LRCLIBLyricsService: GET /api/get with track signature, search fallback,
  LRC timestamp parsing, and recommended User-Agent header.
- Mini player passes album, duration, and live playback position for matching
  and time-synced display.
- New SyncedLyricsScrollView auto-scrolls with spring animation; active line
  uses glow, depth fade, and TimelineView shimmer when playing.
- Plain lyrics use renamed PlainLyricsLineByLineView with LRCLIB attribution.
- Remove Genius HTML lyric scraper.

Co-authored-by: coolbanjo <lasangainc@users.noreply.github.com>
- Use periodic TimelineView with TimeInterval instead of animation +
  Duration.milliseconds, which failed to compile on the current SDK.
- Drop await on synchronous actor cache writes (fixes redundant-await warnings).

Co-authored-by: coolbanjo <lasangainc@users.noreply.github.com>
- Synced view drops capsule, glow, shimmer, and LRCLIB chip; active line is
  sharp semibold default design, others use blur + lower opacity.
- Plain line-by-line view uses default design, similar blur for off-center lines,
  no attribution chip.
- LRCLIB miss, fetch failure, or empty payload shows centered "..." placeholder;
  loading uses a small indeterminate progress only.
- Remove unused isPlaying from the lyrics panel.

Co-authored-by: coolbanjo <lasangainc@users.noreply.github.com>
- Bump synced sizes to 30pt current / 21pt others; plain lines 22–30pt by emphasis.
- Replace smooth curves with high-bounce springs for scroll, line emphasis, and
  synced scale; initial scroll uses the same spring.
- Reduce off-focus blur (synced max ~4.2, plain max ~5.5) and slightly raise
  inactive opacity for readability.

Co-authored-by: coolbanjo <lasangainc@users.noreply.github.com>
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.

2 participants