mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update save-results.js
This commit is contained in:
parent
13c133b329
commit
fd71f35c0e
2 changed files with 16 additions and 6 deletions
|
@ -16,11 +16,21 @@ async function main() {
|
|||
await db.channels.update({ _id: result._id }, { $set: { logo: result.logo } })
|
||||
|
||||
const programs = result.programs.map(program => {
|
||||
program.site = result.site
|
||||
program.country = result.country
|
||||
program.gid = result.gid
|
||||
|
||||
return program
|
||||
return {
|
||||
title: program.title,
|
||||
description: program.description || null,
|
||||
category: program.category || [],
|
||||
season: program.season || null,
|
||||
episode: program.episode || null,
|
||||
icon: program.icon || null,
|
||||
channel: program.channel,
|
||||
lang: program.lang,
|
||||
start: program.start,
|
||||
stop: program.stop,
|
||||
site: result.site,
|
||||
country: result.country,
|
||||
gid: result.gid
|
||||
}
|
||||
})
|
||||
|
||||
await db.programs.insert(programs)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue