From 7b69bb05d4e17d4a7d669f12dbdcd79835ac14d6 Mon Sep 17 00:00:00 2001 From: haiyangcui Date: Tue, 13 Apr 2021 13:27:08 +0200 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=AE=BE=E7=BD=AE=E6=98=AF?= =?UTF-8?q?=E5=90=A6=E6=9C=80=E5=B0=8F=E5=8C=96=E6=97=B6=E6=9A=82=E5=81=9C?= =?UTF-8?q?=E6=92=AD=E6=94=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/Play.vue | 2 +- src/components/Setting.vue | 5 +++-- src/lib/dexie/dexie.js | 3 ++- src/lib/dexie/iniSetting.json | 9 ++++++++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/components/Play.vue b/src/components/Play.vue index 4faf9b5..10e92eb 100644 --- a/src/components/Play.vue +++ b/src/components/Play.vue @@ -1570,7 +1570,7 @@ export default { }, minMaxEvent () { win.on('minimize', () => { - if (this.xg && this.xg.hasStart) { + if (this.xg && this.xg.hasStart && this.setting.pauseWhenMinimize) { this.xg.pause() } }) diff --git a/src/components/Setting.vue b/src/components/Setting.vue index a7251cc..befca8b 100644 --- a/src/components/Setting.vue +++ b/src/components/Setting.vue @@ -111,10 +111,11 @@
-
窗口
+
窗口及播放
- 恢复上次窗口位置和大小 + 记录并恢复窗口位置和大小 + 最小化时暂停播放
diff --git a/src/lib/dexie/dexie.js b/src/lib/dexie/dexie.js index a2c9174..30698ce 100644 --- a/src/lib/dexie/dexie.js +++ b/src/lib/dexie/dexie.js @@ -75,7 +75,7 @@ db.version(10).stores({ db.version(11).stores({ setting: 'id, theme, shortcut, view, volume, externalPlayer, searchGroup, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode,' + - 'searchViewMode, password, proxy, allowPassWhenIptvCheck, autocleanWhenIptvCheck, rootClassFilter, r18ClassFilter, classFilter, restoreWindowPositionAndSize, windowPositionAndSize' + 'searchViewMode, password, proxy, allowPassWhenIptvCheck, autocleanWhenIptvCheck, rootClassFilter, r18ClassFilter, classFilter, restoreWindowPositionAndSize, windowPositionAndSize, pauseWhenMinimize' }).upgrade(trans => { trans.setting.toCollection().modify(setting => { setting.restoreWindowPositionAndSize = false @@ -85,6 +85,7 @@ db.version(11).stores({ width: 1080, height: 720 } + setting.pauseWhenMinimize = false }) }) diff --git a/src/lib/dexie/iniSetting.json b/src/lib/dexie/iniSetting.json index 90d0dcc..ad12525 100644 --- a/src/lib/dexie/iniSetting.json +++ b/src/lib/dexie/iniSetting.json @@ -71,5 +71,12 @@ "里番", "VIP" ], - "restoreWindowSize": false + "restoreWindowPositionAndSize": false, + "windowPositionAndSize": { + "x": 0, + "y": 0, + "width": 1080, + "height": 720 + }, + "pauseWhenMinimize": false }] \ No newline at end of file