From 112f92d3e08f57b675edd06dd3f539e57536f8ee Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Wed, 30 Dec 2020 20:01:04 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9C=A8=E7=BA=BF=E8=A7=A3=E6=9E=90=E6=97=B6?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=BF=9B=E5=8E=86=E5=8F=B2=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/History.vue | 2 ++ src/components/Play.vue | 12 +++++++++--- src/lib/dexie/dexie.js | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/components/History.vue b/src/components/History.vue index 29c6942..143728c 100644 --- a/src/components/History.vue +++ b/src/components/History.vue @@ -45,6 +45,7 @@ label="时间进度"> {{fmtMSS(props.data.time.toFixed(0))}}/{{fmtMSS(props.data.duration.toFixed(0))}} + 在线解析 第{{ props.data.index + 1 }}集(共{{props.data.detail.m3u8List.length}}集) diff --git a/src/components/Play.vue b/src/components/Play.vue index 104a21d..439cf81 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -124,6 +124,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))}} + 在线解析
@@ -638,6 +639,7 @@ export default { } else { this.onlineUrl = 'https://jx.7kjx.com/?url=' + url } + this.videoPlaying('online') return } if (url.endsWith('.mp4') && this.playerType !== 'mp4') { @@ -697,7 +699,7 @@ export default { } }) }, - async videoPlaying () { + async videoPlaying (isOnline) { this.changeVideo() const db = await history.find({ site: this.video.key, ids: this.video.info.id }) let time = this.xg.currentTime || 0 @@ -707,6 +709,9 @@ export default { duration = duration || db.duration await history.remove(db.id) } + if (isOnline) { + time = duration = 0 + } const doc = { site: this.video.key, ids: this.video.info.id, @@ -716,11 +721,12 @@ export default { index: this.video.info.index, time: time, duration: duration, - detail: this.video.detail + detail: this.video.detail, + onlinePlay: isOnline } await history.add(doc) this.updateStar() - this.timerEvent() + if (!isOnline) this.timerEvent() }, changeVideo () { win.setProgressBar(-1) diff --git a/src/lib/dexie/dexie.js b/src/lib/dexie/dexie.js index c987c81..ae0d239 100644 --- a/src/lib/dexie/dexie.js +++ b/src/lib/dexie/dexie.js @@ -31,7 +31,8 @@ db.version(6).stores({ }) db.version(7).stores({ - sites: '++id, key, name, api, download, jiexiUrl, isActive, group' + sites: '++id, key, name, api, download, jiexiUrl, isActive, group', + history: '++id, [site+ids], name, type, year, index, time, duration, detail, onlinePlay' }).upgrade(trans => { trans.sites.toCollection().modify(site => { site.jiexiUrl = ''