Fix lyrics parsing actual lyrics lines as translations for a blank lyric line
Some lyrics providers have lyrics that use duplicated timestamps for formatting reasons, causing the blank line to be parsed as the main lyric, and the second (actual line) to be parsed as a translation. After this change, blank lines will not be eligible for translation.
See the following for an example without translations:
[00:23.73]I see the world through eyes covered in ink and bleach [00:29.70]Cross out the ones who heard my cries and watched me weep [00:35.64]
[00:35.64]I love everything
[00:38.51]Fire's spreading all around my room
[00:43.13]My world's so bright
[00:44.42]It's hard to breathe but that's alright
[00:47.32]Hush
[00:59.22]
[00:59.22]Shh
[01:11.46]
[01:11.46]Tape my eyes open to force reality (oh no, no) [01:17.99]Why can't you just let me eat my weight in glee?
| Before | After |
|---|---|
Lmk if you want me to write tests for this
just fyi "The code in new lyric view to determine current y offset of active lyric line" is still pending
@copilot review this pr
- why are you removing blank translations generally? also testTemplateLrcTranslationType1 fails
- meizu status bar lyric can only display one lyric line at a time and right now it will make it display blank one while lyric with actual content is hidden because it takes first lyric at timestamp, maybe filter blank lines out in that method? https://github.com/FoedusProgramme/Gramophone/blob/d778b0c94bfc9494a87f4ca28a23fa501c84d5f1/app/src/main/java/org/akanework/gramophone/logic/GramophonePlaybackService.kt#L982-L986
- I removed it because extra spacing looks a bit odd. I can revert it nonetheless
- I'll look into it
I can't verify Meizu status bar lyrics, but did verify the indexes that were sent to the widget. They seemed to match up with what should be displayed.