jacquesh / foo_openlyrics

An open-source lyric display panel for foobar2000
MIT License
432 stars 24 forks source link

support for [xx:xx:xx] timestamps in lyrics #378

Closed Mantou1233 closed 1 month ago

Mantou1233 commented 1 month ago

sometimes netease music return [xx:xx:xx] lyrics and the plugin just doesnt like them image (sample song: 東雪蓮 - 雪蓮 / 曖愛傘) could we support those timestamps

jacquesh commented 1 month ago

The LRC format (or at least the most complete resource about it that I know of, wikipedia specifically mandates the format to be [mm:ss.xx] so I generally consider these to be invalid.

It is, however, a common enough problem that we have an auto-edit to correct it: "Fix malformed timestamps". You can run this explicitly on a given set of lyrics via the context menu on the lyric panel: Right-click -> Auto-edit lyrics -> Fix malformed timestamps.

If you're not concerned about it possibly breaking other parsing for the lyrics you have, you can also set this to happen every time lyrics are retrieved from the internet by checking the "Fix malformed timestamps" box under Preferences -> Tools -> OpenLyrics -> Editing"

Since we already have a workaround (and an automated one at that), I'm resolving this issue. Feel free to comment further if this doesn't work for you.

Mantou1233 commented 1 month ago

does the setting only works for lyrics that are not fetched? they doesnt seem to fix on my end

jacquesh commented 1 month ago

Oh, sorry yeah I wasn't clear about that: The checkboxes in preferences only apply when new lyrics are saved from the internet (as I see now is actually called out above the list of checkboxes, I forgot about that!).

For existing lyrics you'll need to use the context menu manually for each set of lyrics that has the bad timestamps, but you can then save those changes (and they'll save automatically unless you've specifically turned auto-save off).