Skip to content

fix(lyrics): treat each LRC timestamp tag as its own line - #6

Closed
lawrence-millard wants to merge 1 commit into
mainfrom
cursor/fix-lrc-multi-timestamp-6515
Closed

lawrence-millard wants to merge 1 commit into
mainfrom
cursor/fix-lrc-multi-timestamp-6515

Conversation

@lawrence-millard

Copy link
Copy Markdown
Owner

Problem

LRC from LRCLIB / Netease / Kugou often puts several times on one line:

[00:20.00][01:05.50]Same chorus

parseLrc used parseLrcTimestamp, which kept only the last tag (65.5s). The 20s chorus never became an active line, so letter-sync and auto-scroll jumped late.

Fix

parseLrcTaggedLine walks consecutive leading [mm:ss(.xxx)] tags, emits one LyricLine per time, then parseLrc sorts by startTime so a later tag on an earlier file line still sits in timeline order.

How to verify (code-level; no device)

Python equivalent of the expander (same numbers the Swift helper uses):

[00:20.00][01:05.50]Same chorus  →  20.0 and 65.5, text "Same chorus"
plus [00:25.00]verse              →  sort 20, 25, 65.5

On device: open lyrics for a track with repeated-chorus LRC; the line must highlight at each listed time, not only the last.

No Last.fm/Discord RPC.

Open in Web Open in Cursor 

Providers emit [mm:ss][mm:ss]chorus. parseLrc kept only the last tag,
so earlier chorus times never synced. Expand each leading tag into
its own line and sort by startTime.

Co-authored-by: Lawrence <lawrence-millard@users.noreply.github.com>
@coderabbitai

coderabbitai Bot commented Aug 29, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@lawrence-millard

Copy link
Copy Markdown
Owner Author

Closed: Lawrence said no auto-PRs.

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