修复 issues #1019

This commit is contained in:
是虹川飴 2021-11-06 16:58:17 +08:00
parent df9e1369a1
commit 876a88ea76

View File

@ -200,10 +200,10 @@ export default {
if (this.lyric === undefined) return '';
let lyric = this.lyric.split('\n');
lyric = lyric.filter(l => {
if (l.includes('作词') || l.includes('作曲')) {
return false;
if (!l.includes('作词')) {
return true;
}
return true;
return false;
});
let lineIndex = randomNum(0, lyric.length - 1);
while (lineIndex + 4 > lyric.length) {
@ -286,8 +286,8 @@ export default {
getLyric(
this.liked.songs[randomNum(0, this.liked.songs.length - 1)]
).then(data => {
console.log(data + '歌词接口似乎会无限挂起');
// if (data.lrc !== undefined) this.lyric = data.lrc.lyric;
if (data.lrc !== undefined && data.lrc.includes('作词'))
this.lyric = data.lrc.lyric;
});
},
openAddPlaylistModal() {