修复有歌词翻译与无歌词的音乐间切换会导致歌词翻译残留显示的问题

pull/389/head
lyswhut 2020-11-22 11:06:45 +08:00
parent 3535bb4e4e
commit 95f38e8048
3 changed files with 4 additions and 14 deletions

View File

@ -1,15 +1,4 @@
### 新增
- 托盘菜单新增显示、隐藏主界面选项为Linux、MAC版添加托盘菜单
- 新增播放进度信息保存
### 优化
- 移除kg源的歌词文件开头的空白字符串
### 修复
- 修复专辑图片无法嵌入的问题
- 修复播放状态栏切换“上一首”歌曲按钮提示错误的问题
- 修复移动单首歌曲时,如果目标列表存在该歌曲,会导致将源列表与目标列表里的目标歌曲移除
- 修复kg源歌曲信息带有单引号等特殊字符被转义的问题
- 修复有歌词翻译与无歌词的音乐间切换会导致歌词翻译残留显示的问题

View File

@ -279,7 +279,7 @@ export default {
rendererSend(NAMES.winLyric.close)
},
setLyric() {
window.lrc.setLyric((this.isShowLyricTransition && this.lyrics.tlyric ? this.lyrics.tlyric + '\n' : '') + this.lyrics.lyric)
window.lrc.setLyric((this.isShowLyricTransition && this.lyrics.tlyric ? (this.lyrics.tlyric + '\n') : '') + (this.lyrics.lyric || ''))
},
},
}

View File

@ -713,6 +713,7 @@ export default {
this.status = this.musicInfo.name = this.musicInfo.singer = ''
this.musicInfo.songmid = null
this.musicInfo.lrc = null
this.musicInfo.tlrc = null
this.musicInfo.url = null
this.nowPlayTime = 0
this.maxPlayTime = 0
@ -891,7 +892,7 @@ export default {
})
},
setLyric() {
window.lrc.setLyric((this.setting.player.isShowLyricTransition && this.musicInfo.tlrc ? this.musicInfo.tlrc + '\n' : '') + this.musicInfo.lrc)
window.lrc.setLyric((this.setting.player.isShowLyricTransition && this.musicInfo.tlrc ? (this.musicInfo.tlrc + '\n') : '') + (this.musicInfo.lrc || ''))
if (this.isPlay && (this.musicInfo.url || this.listId == 'download')) {
window.lrc.play(audio.currentTime * 1000)
this.handleUpdateWinLyricInfo('play', audio.currentTime * 1000)