mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-02-12 15:07:37 +08:00
更新setting数据
This commit is contained in:
@@ -189,12 +189,6 @@ export default {
|
||||
searchTxt () {
|
||||
this.searchChangeEvent()
|
||||
},
|
||||
'setting.sitesList': {
|
||||
handler (nv) {
|
||||
this.getAllsites()
|
||||
},
|
||||
deep: true
|
||||
},
|
||||
'$store.state.editSites.sites': function () {
|
||||
this.getAllsites()
|
||||
}
|
||||
@@ -475,28 +469,16 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
getAllsites (nv) {
|
||||
if (nv) {
|
||||
sites.all().then(res => {
|
||||
this.sites = res
|
||||
for (const i of res) {
|
||||
if (i.key === nv) {
|
||||
this.site = i
|
||||
this.siteClick(this.site)
|
||||
return false
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
sites.all().then(res => {
|
||||
this.sites = res
|
||||
this.site = this.sites[0]
|
||||
this.siteClick(this.site)
|
||||
})
|
||||
}
|
||||
getAllsites () {
|
||||
sites.all().then(res => {
|
||||
this.sites = res
|
||||
this.site = this.sites[0]
|
||||
this.siteClick(this.site)
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getAllsites()
|
||||
this.getAllSearch()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -197,18 +197,15 @@ export default {
|
||||
setting.find().then(res => {
|
||||
this.d = {
|
||||
id: res.id,
|
||||
site: res.site,
|
||||
theme: res.theme,
|
||||
shortcut: res.shortcut,
|
||||
view: res.view,
|
||||
searchAllSites: res.searchAllSites !== null ? res.searchAllSites : true,
|
||||
externalPlayer: res.externalPlayer,
|
||||
editPlayerPath: false,
|
||||
excludeRootClasses: res.excludeRootClasses !== null ? res.excludeRootClasses : true,
|
||||
excludeR18Films: res.excludeR18Films !== null ? res.excludeR18Films : true,
|
||||
forwardTimeInSec: res.forwardTimeInSec !== null ? res.forwardTimeInSec : 5
|
||||
searchAllSites: res.searchAllSites,
|
||||
excludeRootClasses: res.excludeRootClasses,
|
||||
excludeR18Films: res.excludeR18Films,
|
||||
forwardTimeInSec: res.forwardTimeInSec
|
||||
}
|
||||
this.setting = this.d
|
||||
})
|
||||
},
|
||||
getSites () {
|
||||
@@ -346,8 +343,8 @@ export default {
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.getSetting()
|
||||
this.getSites()
|
||||
this.getSetting()
|
||||
this.getShortcut()
|
||||
this.getFavorites()
|
||||
this.getLatestVersion()
|
||||
|
||||
@@ -6,7 +6,7 @@ const db = new Dexie('zy')
|
||||
db.version(3).stores({
|
||||
search: '++id, keywords',
|
||||
iptvSearch: '++id, keywords',
|
||||
setting: 'id, theme, site, shortcut, view',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec',
|
||||
shortcut: 'name, key, desc',
|
||||
star: '++id, site, ids, name, type, year, index',
|
||||
sites: '++id, key, name, json, xml, down, level',
|
||||
|
||||
@@ -2,9 +2,13 @@ const setting = [
|
||||
{
|
||||
id: 0,
|
||||
theme: 'light',
|
||||
site: 'zuidazy',
|
||||
shortcut: true,
|
||||
view: 'picture'
|
||||
view: 'picture',
|
||||
externalPlayer: '',
|
||||
searchAllSites: true,
|
||||
excludeRootClasses: true,
|
||||
excludeR18Films: true,
|
||||
forwardTimeInSec: 5
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user