From b04201f80384496e58ce26bd746f235b1627661d Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sat, 21 Nov 2020 15:52:51 +0800 Subject: [PATCH 01/19] =?UTF-8?q?Play=E5=B0=86win=E5=B8=B8=E9=87=8F?= =?UTF-8?q?=E6=8F=90=E5=8F=96=E5=87=BA=E6=9D=A5=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 1ad6c4c..31c1d41 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -230,6 +230,7 @@ import { directive as onClickaway } from 'vue-clickaway' import { exec, execFile } from 'child_process' const { remote, clipboard } = require('electron') +const win = remote.getCurrentWindow() const PinyinMatch = require('pinyin-match') const VIDEO_DETAIL_CACHE = {} @@ -642,7 +643,6 @@ export default { this.timerEvent() }, changeVideo () { - const win = remote.getCurrentWindow() win.setProgressBar(-1) this.checkStar() this.checkTop() @@ -652,7 +652,6 @@ export default { const endTime = this.xg.duration const currentTime = this.xg.currentTime const progress = parseFloat((currentTime / endTime).toFixed(2)) - const win = remote.getCurrentWindow() win.setProgressBar(progress) const db = await history.find({ site: this.video.key, ids: this.video.info.id }) if (db) { @@ -768,7 +767,6 @@ export default { } }, async miniEvent () { - const win = remote.getCurrentWindow() this.mainWindowBounds = JSON.parse(JSON.stringify(win.getBounds())) let miniWindowBounds await mini.find().then(res => { if (res) miniWindowBounds = res.bounds }) @@ -778,7 +776,6 @@ export default { this.miniMode = true }, async exitMiniEvent () { - const win = remote.getCurrentWindow() await mini.find().then(res => { let doc = {} doc = { @@ -873,7 +870,6 @@ export default { } }, checkTop () { - const win = remote.getCurrentWindow() this.isTop = win.isAlwaysOnTop() }, closeListEvent () { @@ -1023,7 +1019,7 @@ export default { if (this.xg.paused) { this.xg.play() // 继续播放时,隐藏进度条 - remote.getCurrentWindow().setProgressBar(-1) + win.setProgressBar(-1) } else { this.xg.pause() } @@ -1061,7 +1057,6 @@ export default { return false } if (e === 'top') { - const win = remote.getCurrentWindow() if (win.isAlwaysOnTop()) { win.setAlwaysOnTop(false) } else { @@ -1109,7 +1104,6 @@ export default { return false } if (e === 'opacityUp') { - const win = remote.getCurrentWindow() const num = win.getOpacity() if (num > 0.1) { win.setOpacity(num - 0.1) @@ -1117,7 +1111,6 @@ export default { return false } if (e === 'opacityDown') { - const win = remote.getCurrentWindow() const num = win.getOpacity() if (num < 1) { win.setOpacity(num + 0.1) @@ -1319,7 +1312,6 @@ export default { }) }, videoStop () { - const win = remote.getCurrentWindow() win.setProgressBar(-1) if (this.xg.fullscreen) { this.xg.exitFullscreen() @@ -1340,7 +1332,6 @@ export default { }, 1000) }, minMaxEvent () { - const win = remote.getCurrentWindow() win.on('minimize', () => { if (this.xg && this.xg.hasStart) { this.xg.pause() From 4dc88469e8d3660bc1e38065fd7e6442fe4d4364 Mon Sep 17 00:00:00 2001 From: buvta <12312540+buvta@users.noreply.github.com> Date: Sat, 21 Nov 2020 15:55:08 +0800 Subject: [PATCH 02/19] =?UTF-8?q?=E8=B0=83=E6=95=B4iptv=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E5=88=97=E8=A1=A8=E5=A4=B4=EF=BC=8C=E4=B8=A4=E7=A7=8D=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E6=A8=A1=E5=BC=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/IPTV.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/IPTV.vue b/src/components/IPTV.vue index cf878b8..dd550f1 100644 --- a/src/components/IPTV.vue +++ b/src/components/IPTV.vue @@ -91,7 +91,7 @@ align="right" :width="200">