feat. OSD Lyrics | 增加桌面歌词功能 (#685)

* Add OSD Lyrics

* tidy files

* fix OSDLyrics: last line of lyrics not showing, performance

* tidy files

* make user can resize the lyrics window

* Fix bug of initial window size

* Fix: 1. auto resize osdlyrics window after packaging; 2. lyric parser problem with %;

* tidy files
This commit is contained in:
Shi Liang 2021-05-21 17:15:30 +08:00 committed by GitHub
parent d464e30d83
commit 85592142af
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 405 additions and 5 deletions

View file

@ -13,7 +13,7 @@ export function parseLyric(lrc) {
const lyrics = lrc.split('\n');
const lrcObj = [];
for (let i = 0; i < lyrics.length; i++) {
const lyric = decodeURIComponent(lyrics[i]);
const lyric = lyrics[i];
const timeReg = /\[\d*:\d*((\.|:)\d*)*\]/g;
const timeRegExpArr = lyric.match(timeReg);
if (!timeRegExpArr) continue;