Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve LRC parse handling #5

Merged
merged 1 commit into from
May 2, 2023
Merged

Conversation

taoky
Copy link
Collaborator

@taoky taoky commented May 2, 2023

This modifies lrc_iter() in lyric/utils.rs:

  • After discussing with @poly000, it shows that moving trimming logic from Lyric into_owned() to here is a better idea.
  • Sort lyrics by their timestamp after collecting lyrics vector. This helps handling LRC files with timestamp in malformed order.
    • An example [00:39.42]ずっと考えてでも\n[00:28.77]\n[00:31.19]

 Mention [stepsize] in a comment if you'd like to report some technical debt. See examples here.

This modifies lrc_iter() in lyric/utils.rs
- Move trimming logic from Lyric into_owned() to here
- Sort lyrics by their timestamp after collecting lyrics vector. This helps handling LRC files with timestamp in malformed order
@mokurin000 mokurin000 merged commit b6ed6ec into waylyrics:master May 2, 2023
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.

None yet

2 participants