Repository navigation
nightly-ee6e08a7-ls13
Pre-releaseCI
LinuxServer changes
Full Changelog: nightly-9501e085-ls12...nightly-ee6e08a7-ls13
Upstream changes
Source: beetbox/beets@ee6e08a
lyrics: keep synced LRCLib lyrics that end with a blank line (#7095)
Description
Fixes #7070.
With synced: yes, LRCLib candidates whose syncedLyrics end with a
blank line (...\r\n\r\n) were silently stored as plain lyrics.
LRCLyrics.verify_synced_lyrics matched LINE_PARTS_PAT against
lyrics.splitlines()[-1], which is "" for those entries, so the
timestamp group was empty and the synced lyrics were rejected.
The check now uses the last line with text
(lyrics.rstrip().splitlines()), with a guard so whitespace-only input
is still rejected rather than raising IndexError. The returned lyrics
are unchanged.
I left the duration tolerance point from the issue alone, since it
changes which candidates are accepted and is probably worth a separate
discussion.
To Do
-
Documentation(bug fix, no docs change needed) - Changelog (entry under Bug fixes)
- Tests: new
TestLRCLibLyrics.test_fetch_lyricscase "synced with
trailing blank line" (fails without the fix, passes with it)
Tests run
pytest test/plugins/test_lyrics.py→ 130 passed, 18 skippedruff check/ruff format --checkon the changed files
AI assistance was used to help find the cause, write the patch, and run
tests; I reviewed the change and can answer questions about it.