Don't parse word time tags if multiple line times are present#88
Don't parse word time tags if multiple line times are present#88andy840119 merged 1 commit intokaraoke-dev:mainfrom
Conversation
9aa3344 to
7c31d67
Compare
|
I know lrc support multiple line times with one lyric line, but i did not remember the time tag will be dropped. |
|
Since there's no official spec, it's hard to quote one, but this new behavior is reasonable because of the mentioned conflict between line time and absolute word times. I've alwo never seen a mix of multiple line times and word times being used in the wild. It's also a requirement for #85, which uses the line time for the initial word. |
I know it's hard to have those case, but if it's still reasonable to keep both multiple line times and word times? |
I don't think it is, since I'd prefer to not parse them at all than to return wrong results. If the line isn't parsed, the user will notice their mistake and fix the LRC file. |
|
If that so, maybe tell the reason before e.g. |
7c31d67 to
f0f8c44
Compare
|
Tweaked the comment 👍 |
f0f8c44 to
9ce59eb
Compare
andy840119
left a comment
There was a problem hiding this comment.
I can give it a pass that drop the time-tag if has multiple time-tags.
But I'm not fully convinced, which future developers might have same issue.
Give adjust the comment a try ✊🏼
Word time tags are absolute timestamps in the lyrics, so having multiple line times would generally conflict with them. Thus, they should be just ignored instead, since the format is wrong. The same applies if there is no line time tag, in that case, it wouldn't be known when the first word starts. Both are inconsidered incorrect LRC and thus only parsed on a best-effort basis.
9ce59eb to
4b16a60
Compare
andy840119
left a comment
There was a problem hiding this comment.
Consider those edge not happened frequently, it's ok for me to handle with this way.
Word time tags are absolute timestamps in the lyrics, so having multiple line times would generally conflict with them. Thus, they should be just ignored instead, since the format is wrong.
The same applies if there is no line time tag, in that case, it wouldn't be known when the first word starts.
Both are inconsidered incorrect LRC and thus only parsed on a best-effort basis.