新增“记住播放进度”功能的控制,优化设置项展示

This commit is contained in:
lyswhut
2021-01-25 10:44:03 +08:00
parent 041bfdaf3c
commit 331afc37df
7 changed files with 113 additions and 142 deletions
+29 -8
View File
@@ -303,14 +303,26 @@ export default {
},
nowPlayTime(n, o) {
if (Math.abs(n - o) > 2) this.isActiveTransition = true
if (this.playInfo.isTempPlay) return
this.savePlayInfo({
time: n,
maxTime: this.maxPlayTime,
listId: this.listId,
list: this.listId == null ? this.list : null,
index: this.playIndex,
})
if (this.setting.player.isSavePlayTime && !this.playInfo.isTempPlay) {
this.savePlayInfo({
time: n,
maxTime: this.maxPlayTime,
listId: this.listId,
list: this.listId == null ? this.list : null,
index: this.playIndex,
})
}
},
maxPlayTime(maxPlayTime) {
if (!this.playInfo.isTempPlay) {
this.savePlayInfo({
time: this.nowPlayTime,
maxTime: maxPlayTime,
listId: this.listId,
list: this.listId == null ? this.list : null,
index: this.playIndex,
})
}
},
},
methods: {
@@ -495,6 +507,15 @@ export default {
name: this.musicInfo.name,
album: this.musicInfo.album,
})
if (!this.playInfo.isTempPlay) {
this.savePlayInfo({
time: this.nowPlayTime,
maxTime: this.maxPlayTime,
listId: this.listId,
list: this.listId == null ? this.list : null,
index: this.playIndex,
})
}
},
clearDelayNextTimeout() {
// console.log(this.delayNextTimeout)