如果时间进度已经设定,无需读取历史数据

This commit is contained in:
haiyangcui
2020-11-04 09:43:20 +01:00
parent bf3b6d4088
commit 59d33d201c

View File

@@ -340,15 +340,16 @@ export default {
this.getIptvList()
} else {
const index = this.video.info.index | 0
let historyTime = 0
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
if (db) {
if (db.index === index) {
historyTime = db.time
var time = this.video.info.time
if (!time) {
// 如果video.info.time没有设定的话从历史中读取时间进度
const db = await history.find({ site: this.video.key, ids: this.video.info.id })
if (db) {
if (db.index === index) {
time = db.time
}
}
}
// 如果video.info.time没有设定的话从历史中读取时间进度
const time = this.video.info.time | historyTime
this.playVideo(index, time)
}
},