From 0b4dd2e8594fb9fc1b0215e1f5ff3cc08f42020c Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sun, 27 Dec 2020 23:51:46 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=BF=E9=87=8C=E4=BA=91=E8=B5=84=E6=BA=90?= =?UTF-8?q?=E7=AB=99=E4=B8=B4=E6=97=B6=E5=8F=AF=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 13 +++++++++---- src/lib/dexie/iniData/Sites.json | 12 +++++++++++- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 950dbbf..9cc64ff 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -248,7 +248,7 @@ import mt from 'mousetrap' import Clickoutside from 'element-ui/src/utils/clickoutside' import { exec, execFile } from 'child_process' -const { remote, clipboard } = require('electron') +const { shell, remote, clipboard } = require('electron') const win = remote.getCurrentWindow() const PinyinMatch = require('pinyin-match') @@ -578,10 +578,15 @@ export default { this.isLive = false if (document.querySelector('xg-btn-showhistory')) document.querySelector('xg-btn-showhistory').style.display = 'block' if (document.querySelector('.xgplayer-playbackrate')) document.querySelector('.xgplayer-playbackrate').style.display = 'inline-block' - this.fetchM3u8List().then(m3u8Arr => { + this.fetchM3u8List().then(async (m3u8Arr) => { const url = m3u8Arr[index] - if (!m3u8Arr[index].endsWith('.m3u8')) { - this.onlineUrl = 'https://jx.7kjx.com/?url=' + url + if (!url.endsWith('.m3u8')) { + const currentSite = await sites.find({ key: this.video.key }) + if (currentSite.api.includes('www.cqzyw.net')) { + shell.openExternal('http://vip.cqzyw.net/?url=' + url) + } else { + this.onlineUrl = 'https://jx.7kjx.com/?url=' + url + } } else { this.xg.src = m3u8Arr[index] const key = this.video.key + '@' + this.video.info.id diff --git a/src/lib/dexie/iniData/Sites.json b/src/lib/dexie/iniData/Sites.json index aba3217..599cfe7 100644 --- a/src/lib/dexie/iniData/Sites.json +++ b/src/lib/dexie/iniData/Sites.json @@ -158,5 +158,15 @@ "group": "默认", "isActive": true, "status": "可用" + }, + { + "id": 17, + "key": "alizy", + "name": "阿里云资源", + "api": "http://www.cqzyw.net:88/api.php/provide/vod/at/xml/", + "download": "", + "group": "默认", + "isActive": true, + "status": "可用" } -] \ No newline at end of file +]