mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update update.js
This commit is contained in:
@@ -85,8 +85,9 @@ async function main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
programs = _.flatten(Object.values(programs))
|
programs = _.flatten(Object.values(programs))
|
||||||
programs = programs = _.sortBy(programs, ['channel', 'start'])
|
|
||||||
programs = programs.map(p => new Program(p, new Channel(channels_dic[p.channel])))
|
if (!programs.length) continue
|
||||||
|
|
||||||
let channels = programs.map(p => {
|
let channels = programs.map(p => {
|
||||||
let c = channels_dic[p.channel]
|
let c = channels_dic[p.channel]
|
||||||
c.site = p.site
|
c.site = p.site
|
||||||
@@ -97,6 +98,9 @@ async function main() {
|
|||||||
channels = _.sortBy(channels, 'id')
|
channels = _.sortBy(channels, 'id')
|
||||||
channels = _.uniqBy(channels, 'id')
|
channels = _.uniqBy(channels, 'id')
|
||||||
|
|
||||||
|
programs = programs = _.sortBy(programs, ['channel', 'start'])
|
||||||
|
programs = programs.map(p => new Program(p, new Channel(channels_dic[p.channel])))
|
||||||
|
|
||||||
const filename = country.code.toLowerCase()
|
const filename = country.code.toLowerCase()
|
||||||
const xmlFilepath = `${PUBLIC_DIR}/guides/${filename}.xml`
|
const xmlFilepath = `${PUBLIC_DIR}/guides/${filename}.xml`
|
||||||
const gzFilepath = `${PUBLIC_DIR}/guides/${filename}.xml.gz`
|
const gzFilepath = `${PUBLIC_DIR}/guides/${filename}.xml.gz`
|
||||||
|
|||||||
Reference in New Issue
Block a user