diff --git a/src/components/Play.vue b/src/components/Play.vue
index 9ffb74c..f616a21 100644
--- a/src/components/Play.vue
+++ b/src/components/Play.vue
@@ -123,7 +123,7 @@
上次播放到:【{{right.history[0].site}}】{{right.history[0].name}} 第{{right.history[0].index+1}}集
- {{fmtMSS(right.history[0].time.toFixed(0))}}/{{fmtMSS(right.history[0].duration.toFixed(0))}}
+ {{fmtMSS(right.history[0].time.toFixed(0))}}/{{fmtMSS(right.history[0].duration.toFixed(0))}}
@@ -684,9 +684,11 @@ export default {
async videoPlaying () {
this.changeVideo()
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
- let time
+ let time = this.xg.currentTime || 0
+ let duration = this.xg.duration || 0
if (db) {
- time = db.time || ''
+ time = time || db.time
+ duration = duration || db.duration
await history.remove(db.id)
}
const doc = {
@@ -697,6 +699,7 @@ export default {
year: this.video.info.year,
index: this.video.info.index,
time: time,
+ duration: duration,
detail: this.video.detail
}
await history.add(doc)