mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update update-api.js
This commit is contained in:
parent
0398016707
commit
955c8a15f3
1 changed files with 2 additions and 4 deletions
|
@ -8,7 +8,7 @@ async function main() {
|
|||
await loadQueue()
|
||||
|
||||
const programs = await loadPrograms()
|
||||
const guides = await loadGuides(programs)
|
||||
const guides = await getGuides(programs)
|
||||
|
||||
await saveToGuidesJson(guides)
|
||||
await saveToProgramsJson(programs)
|
||||
|
@ -22,9 +22,7 @@ async function loadQueue() {
|
|||
await db.queue.load()
|
||||
}
|
||||
|
||||
async function loadGuides(programs = []) {
|
||||
logger.info('Loading guides from database...')
|
||||
|
||||
async function getGuides(programs = []) {
|
||||
programs = _.groupBy(programs, i => i._qid)
|
||||
|
||||
const queue = await db.queue.find({}).sort({ xmltv_id: 1 })
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue