修复播放器的停止逻辑问题

pull/930/merge
lyswhut 2022-02-24 17:23:33 +08:00
parent 0f0be95c12
commit 6105a331aa
3 changed files with 4 additions and 3 deletions

View File

@ -22,6 +22,7 @@
- 修复下载功能的歌词换源时会进入死循环的问题
- 修复某些歌曲无法下载的问题
- 修复windows平台下软件目录存在`portable`文件夹时,仍会创建`C:\Users\<user>\AppData\Roaming\lx-music-desktop\Dictionaries\en-US-9-0.bdic`文件的问题现在不会再创建文件但仍会创建空目录Electron的问题目前暂无解决方法
- 修复播放器的停止逻辑问题
### 其他

View File

@ -104,7 +104,7 @@ export const getPlayIndex = (listId, musicInfo, isTempPlay) => {
}
const list = getList(listId)
if (list?.length) {
if (list?.length && musicInfo) {
if (musicInfo.key) { // 已下载的歌曲
const currentKey = musicInfo.key
playIndex = list.findIndex(m => m.key == currentKey)

View File

@ -27,7 +27,6 @@ import {
setMusicInfo,
musicInfoItem,
playMusicInfo,
playInfo,
setPlayList,
setPlayMusicInfo,
playedList,
@ -227,7 +226,7 @@ export default ({ setting }) => {
return
}
if (playInfo.musicInfo) {
if (playMusicInfo.musicInfo) {
setPlayerStop()
window.eventHub.emit(eventPlayerNames.pause)
setStopStatus()
@ -285,6 +284,7 @@ export default ({ setting }) => {
const handelStop = () => {
setPlayerStop()
setPlayMusicInfo(playMusicInfo.listId, null)
window.eventHub.emit(eventPlayerNames.stop)
}