diff --git a/src/components/Play.vue b/src/components/Play.vue
index 50f6ec6..942a255 100644
--- a/src/components/Play.vue
+++ b/src/components/Play.vue
@@ -121,8 +121,10 @@
{ startPosition.min = startPosition.sec = endPosition.min = endPosition.sec = '00'; this.clearPosition() }">
-
- 上次播放到:【{{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))}}
+
+ 上次播放到:【{{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))}}
+
@@ -677,31 +679,18 @@ export default {
async videoPlaying () {
this.changeVideo()
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
- if (db) {
- const doc = {
- site: db.site,
- ids: db.ids,
- name: db.name,
- type: db.type,
- year: db.year,
- index: this.video.info.index,
- time: db.time,
- detail: this.video.detail
- }
- history.update(db.id, doc)
- } else {
- const doc = {
- site: this.video.key,
- ids: this.video.info.id,
- name: this.video.info.name,
- type: this.video.info.type,
- year: this.video.info.year,
- index: this.video.info.index,
- time: '',
- detail: this.video.detail
- }
- history.add(doc)
+ if (db) await history.remove(db.id)
+ const doc = {
+ site: this.video.key,
+ ids: this.video.info.id,
+ name: this.video.info.name,
+ type: this.video.info.type,
+ year: this.video.info.year,
+ index: this.video.info.index,
+ time: '',
+ detail: this.video.detail
}
+ history.add(doc)
this.updateStar()
this.timerEvent()
},