Home

dev / openkara

publicthedavidweng/OpenKara· sync paused
Overview Code History Branches Pull requestsIssuesInsights
main
HomeOverview Code PRsIssues

#465 Bracketed [ti:] values truncate at the first ], so those .lrc files never match on import

open

Opened by Levison · 6 days ago

Levisonopened this issueAuthor· 6 days ago

Description

parse_lrc_metadata takes everything up to the first ] on a line, so [ti:Vision [Radio Edit]] parses as Vision [Radio Edit. import_lyrics_files compares [ti:] and [ar:] against the song's title and artist exactly, so such a file matches no song and is reported unmatched. [al:] truncates the same way.

Steps to reproduce

  1. Import a song with a bracketed title — artist Artist, title Vision [Radio Edit].
  2. Import an .lrc beginning:
[ti:Vision [Radio Edit]]
[ar:Artist]
[00:10.00]First line

Expected behavior

The .lrc matches the song, as it would if the title had no brackets.

Actual behavior

Unmatched. The parsed title is Vision [Radio Edit.

Environment

  • Version: 0.15.0 (main d1d1ffd0)
  • OS: Windows 10

Additional context

parse_lrc_metadata in src-tauri/src/lyrics/parser.rs uses stripped.find(']'). I have a fix with regression tests and will open a PR.

Sign in to comment.

Linked pull requests

No linked pull requests yet.