mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-12-01 08:44:31 +08:00
修正Recommendation的拼写
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
import Dexie from 'dexie'
|
||||
import { setting, sites, localKey, iptv, recommandations } from './initData'
|
||||
import { setting, sites, localKey, iptv, recommendations } from './initData'
|
||||
|
||||
const db = new Dexie('zy')
|
||||
|
||||
db.version(4).stores({
|
||||
search: '++id, keywords',
|
||||
iptvSearch: '++id, keywords',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommandationViewMode, password',
|
||||
setting: 'id, theme, site, shortcut, view, externalPlayer, searchAllSites, excludeRootClasses, excludeR18Films, forwardTimeInSec, starViewMode, recommendationViewMode, password',
|
||||
shortcut: 'name, key, desc',
|
||||
star: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
recommandation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
recommendation: '++id, [key+ids], site, name, detail, index, rate, hasUpdate',
|
||||
sites: '++id, key, name, api, download, isActive, group',
|
||||
history: '++id, [site+ids], name, type, year, index, time',
|
||||
mini: 'id, site, ids, name, index, time',
|
||||
@@ -21,7 +21,7 @@ db.on('populate', () => {
|
||||
db.sites.bulkAdd(sites)
|
||||
db.shortcut.bulkAdd(localKey)
|
||||
db.iptv.bulkAdd(iptv)
|
||||
db.recommandation.bulkAdd(recommandations)
|
||||
db.recommendation.bulkAdd(recommendations)
|
||||
})
|
||||
|
||||
db.open()
|
||||
|
||||
@@ -7,7 +7,7 @@ import sites from './sites'
|
||||
import search from './search'
|
||||
import iptvSearch from './iptvSearch'
|
||||
import iptv from './iptv'
|
||||
import recommandation from './recommandation'
|
||||
import recommendation from './recommendation'
|
||||
|
||||
export {
|
||||
history,
|
||||
@@ -19,5 +19,5 @@ export {
|
||||
iptv,
|
||||
search,
|
||||
iptvSearch,
|
||||
recommandation
|
||||
recommendation
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ const setting = [
|
||||
excludeR18Films: true,
|
||||
forwardTimeInSec: 5,
|
||||
starViewMode: 'picture',
|
||||
recommandationViewMode: 'picture',
|
||||
recommendationViewMode: 'picture',
|
||||
password: ''
|
||||
}
|
||||
]
|
||||
@@ -118,12 +118,12 @@ const getSite = (key) => {
|
||||
|
||||
const sites = require('./iniData/Sites.json')
|
||||
const iptv = require('./iniData/Iptv.json')
|
||||
const recommandations = require('./iniData/Recommandations.json')
|
||||
const recommendations = require('./iniData/Recommendations.json')
|
||||
export {
|
||||
setting,
|
||||
sites,
|
||||
iptv,
|
||||
recommandations,
|
||||
recommendations,
|
||||
localKey,
|
||||
getSite
|
||||
}
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
import db from './dexie'
|
||||
const { recommandation } = db
|
||||
export default {
|
||||
async add (doc) {
|
||||
return await recommandation.add(doc)
|
||||
},
|
||||
async bulkAdd (doc) {
|
||||
return await recommandation.bulkAdd(doc)
|
||||
},
|
||||
async find (doc) {
|
||||
return await recommandation.where(doc).first()
|
||||
},
|
||||
async update (id, docs) {
|
||||
return await recommandation.update(id, docs)
|
||||
},
|
||||
async all () {
|
||||
return await recommandation.toArray()
|
||||
},
|
||||
async remove (id) {
|
||||
return await recommandation.delete(id)
|
||||
},
|
||||
async get (id) {
|
||||
return await recommandation.get(id)
|
||||
},
|
||||
async clear () {
|
||||
return await recommandation.clear()
|
||||
}
|
||||
}
|
||||
28
src/lib/dexie/recommendation.js
Normal file
28
src/lib/dexie/recommendation.js
Normal file
@@ -0,0 +1,28 @@
|
||||
import db from './dexie'
|
||||
const { recommendation } = db
|
||||
export default {
|
||||
async add (doc) {
|
||||
return await recommendation.add(doc)
|
||||
},
|
||||
async bulkAdd (doc) {
|
||||
return await recommendation.bulkAdd(doc)
|
||||
},
|
||||
async find (doc) {
|
||||
return await recommendation.where(doc).first()
|
||||
},
|
||||
async update (id, docs) {
|
||||
return await recommendation.update(id, docs)
|
||||
},
|
||||
async all () {
|
||||
return await recommendation.toArray()
|
||||
},
|
||||
async remove (id) {
|
||||
return await recommendation.delete(id)
|
||||
},
|
||||
async get (id) {
|
||||
return await recommendation.get(id)
|
||||
},
|
||||
async clear () {
|
||||
return await recommendation.clear()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user