chore: lrc now also support mm:ss.zzz instead of .zz only

This commit is contained in:
Gary Wang 2024-09-25 19:50:50 +08:00
parent 04ed6d435c
commit 4b57dda342
No known key found for this signature in database
GPG Key ID: 5D30A4F15EA78760

View File

@ -66,7 +66,7 @@ bool LyricsManager::loadLyrics(QString filepath)
// parse lyrics timestamp // parse lyrics timestamp
QRegularExpression tagRegex(R"regex(\[(ti|ar|al|au|length|by|offset|tool|re|ve|#):\s?([^\]]*)\]$)regex"); QRegularExpression tagRegex(R"regex(\[(ti|ar|al|au|length|by|offset|tool|re|ve|#):\s?([^\]]*)\]$)regex");
QRegularExpression lrcRegex(R"regex(\[(\d{2,3}:\d{2}\.\d{2})\](.*))regex"); QRegularExpression lrcRegex(R"regex(\[(\d{2,3}:\d{2}\.\d{2,3})\](.*))regex");
bool tagSectionPassed = false; bool tagSectionPassed = false;
for (QString line : std::as_const(lines)) { for (QString line : std::as_const(lines)) {