移除kg源的歌词文件开头的空白字符串

This commit is contained in:
lyswhut
2020-11-02 15:13:09 +08:00
parent 897107ca23
commit 5c96c83f98
4 changed files with 20 additions and 26 deletions
+9 -17
View File
@@ -667,23 +667,15 @@ export default {
}
},
setLrc(targetSong) {
this.musicInfo.lrc = targetSong.lrc
this.musicInfo.tlrc = targetSong.tlrc
let lrcP = this.musicInfo.lrc && this.musicInfo.tlrc != null
? Promise.resolve()
: this.getLrc(targetSong).then(() => {
this.musicInfo.lrc = targetSong.lrc
this.musicInfo.tlrc = targetSong.tlrc
})
lrcP
.catch(() => {
this.status = this.statusText = this.$t('core.player.lyric_error')
}).finally(() => {
this.handleUpdateWinLyricInfo('lyric', { lrc: this.musicInfo.lrc, tlrc: this.musicInfo.tlrc })
this.setLyric()
})
this.getLrc(targetSong).then(() => {
this.musicInfo.lrc = targetSong.lrc
this.musicInfo.tlrc = targetSong.tlrc
}).catch(() => {
this.status = this.statusText = this.$t('core.player.lyric_error')
}).finally(() => {
this.handleUpdateWinLyricInfo('lyric', { lrc: this.musicInfo.lrc, tlrc: this.musicInfo.tlrc })
this.setLyric()
})
},
handleRemoveMusic() {
this.stopPlay()