mirror of
https://github.com/cuiocean/ZY-Player.git
synced 2026-11-04 22:45:25 +08:00
数据库调整,新增channelList,根据iptvList自动生成
This commit is contained in:
25
src/lib/dexie/channelList.js
Normal file
25
src/lib/dexie/channelList.js
Normal file
@@ -0,0 +1,25 @@
|
||||
import db from './dexie'
|
||||
const { channelList } = db
|
||||
export default {
|
||||
async all () {
|
||||
return await channelList.toArray()
|
||||
},
|
||||
async clear () {
|
||||
return await channelList.clear()
|
||||
},
|
||||
async add (doc) {
|
||||
return await channelList.add(doc)
|
||||
},
|
||||
async bulkAdd (doc) {
|
||||
return await channelList.bulkAdd(doc)
|
||||
},
|
||||
async find (doc) {
|
||||
return await channelList.get(doc)
|
||||
},
|
||||
async update (id, docs) {
|
||||
return await channelList.update(id, docs)
|
||||
},
|
||||
async remove (id) {
|
||||
return await channelList.delete(id)
|
||||
}
|
||||
}
|
||||
@@ -13,7 +13,8 @@ db.version(4).stores({
|
||||
sites: '++id, key, name, api, download, isActive, group',
|
||||
history: '++id, [site+ids], name, type, year, index, time, duration, detail',
|
||||
mini: 'id, mode, site, ids, name, index, time, url',
|
||||
iptv: '++id, name, url, group, isActive'
|
||||
iptv: '++id, name, url, channelID, isActive',
|
||||
channelList: '++id, name, prefer, channels, group, isActive'
|
||||
})
|
||||
|
||||
db.on('populate', () => {
|
||||
|
||||
@@ -7,6 +7,7 @@ import sites from './sites'
|
||||
import search from './search'
|
||||
import iptvSearch from './iptvSearch'
|
||||
import iptv from './iptv'
|
||||
import channelList from './channelList'
|
||||
import recommendation from './recommendation'
|
||||
|
||||
export {
|
||||
@@ -17,6 +18,7 @@ export {
|
||||
star,
|
||||
sites,
|
||||
iptv,
|
||||
channelList,
|
||||
search,
|
||||
iptvSearch,
|
||||
recommendation
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user