优化软件启动时恢复上一次播放的歌曲进度功能

This commit is contained in:
lyswhut
2020-12-11 08:29:30 +08:00
parent f1049169b5
commit 10e5460e39
4 changed files with 48 additions and 12 deletions
+3 -1
View File
@@ -284,7 +284,7 @@ export default {
l.sourceListId = id
if (!needSave) needSave = true
})
if (needSave) this.this.saveUserList(userList)
if (needSave) this.saveUserList(userList)
} else {
userList = this.userList
}
@@ -320,7 +320,9 @@ export default {
initPlayInfo() {
rendererInvoke(NAMES.mainWindow.get_data, 'playInfo').then(info => {
// console.log(info, window.allList)
window.restorePlayInfo = null
if (!info) return
if (info.index < 0) return
if (info.listId) {
const list = window.allList[info.listId]
// console.log(list)