From 11baacc778f0751abc26a8910aadf00fcc606532 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Tue, 10 Nov 2020 22:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=B4=E6=92=AD=E6=94=AF=E6=8C=81=E7=B2=BE?= =?UTF-8?q?=E7=AE=80=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 29 ++++++++++++++++++++++------- src/lib/dexie/dexie.js | 2 +- src/mini/Mini.vue | 5 +++++ 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 0070e25..cfa60cd 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -109,6 +109,12 @@ + + + 精简模式 + + + 使用第三方播放器 @@ -620,14 +626,23 @@ export default { this.xg.pause() } mini.find().then(res => { - const doc = { - id: 0, - site: this.video.key, - ids: this.video.info.id, - name: this.video.info.name, - index: this.video.info.index, - time: this.xg.currentTime + var doc = {} + if (!this.video.iptv) { + doc = { + id: 0, + site: this.video.key, + ids: this.video.info.id, + name: this.video.info.name, + index: this.video.info.index, + time: this.xg.currentTime + } + } else { + doc = { + id: 0, + url: this.video.iptv.url + } } + console.log(doc) if (res) { mini.update(doc) } else { diff --git a/src/lib/dexie/dexie.js b/src/lib/dexie/dexie.js index c05ff56..ee5f314 100644 --- a/src/lib/dexie/dexie.js +++ b/src/lib/dexie/dexie.js @@ -12,7 +12,7 @@ db.version(4).stores({ recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate', sites: '++id, key, name, api, download, isActive, group', history: '++id, [site+ids], name, type, year, index, time, duration, detail', - mini: 'id, site, ids, name, index, time', + mini: 'id, site, ids, name, index, time, url', iptv: '++id, name, url, group, isActive' }) diff --git a/src/mini/Mini.vue b/src/mini/Mini.vue index e31d82c..9ffb39c 100644 --- a/src/mini/Mini.vue +++ b/src/mini/Mini.vue @@ -107,6 +107,11 @@ export default { }, getUrls () { mini.find().then(res => { + if (res.url) { + this.xg.src = res.url + this.xg.play() + return + } this.video = res this.fetchM3u8List(res).then(m3u8Arr => { this.m3u8Arr = m3u8Arr