支持设置是否最小化时暂停播放

This commit is contained in:
haiyangcui
2021-04-13 13:27:08 +02:00
parent 3b6b6ea11b
commit 7b69bb05d4
4 changed files with 14 additions and 5 deletions

View File

@@ -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()
}
})

View File

@@ -111,10 +111,11 @@
</div>
</div>
<div class="site">
<div class="title">窗口</div>
<div class="title">窗口及播放</div>
<div class="site-box">
<div class="zy-input">
<input type="checkbox" v-model = "d.restoreWindowPositionAndSize" @change="updateSettingEvent"> 恢复上次窗口位置和大小
<input type="checkbox" v-model = "d.restoreWindowPositionAndSize" @change="updateSettingEvent"> 记录并恢复窗口位置和大小
<input type="checkbox" v-model = "d.pauseWhenMinimize" @change="updateSettingEvent"> 最小化时暂停播放
</div>
</div>
</div>

View File

@@ -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
})
})

View File

@@ -71,5 +71,12 @@
"里番",
"VIP"
],
"restoreWindowSize": false
"restoreWindowPositionAndSize": false,
"windowPositionAndSize": {
"x": 0,
"y": 0,
"width": 1080,
"height": 720
},
"pauseWhenMinimize": false
}]