mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update queueCreator.ts
This commit is contained in:
parent
571b77b481
commit
d466a071e5
1 changed files with 11 additions and 7 deletions
|
@ -36,18 +36,22 @@ export class QueueCreator {
|
||||||
|
|
||||||
const queue = new Queue()
|
const queue = new Queue()
|
||||||
for (const channel of this.parsedChannels.all()) {
|
for (const channel of this.parsedChannels.all()) {
|
||||||
if (!channel.site || !channel.xmltv_id) continue
|
if (!channel.site || !channel.site_id || !channel.name) continue
|
||||||
if (this.options.lang && channel.lang !== this.options.lang) continue
|
if (this.options.lang && channel.lang !== this.options.lang) continue
|
||||||
|
|
||||||
const configPath = path.resolve(SITES_DIR, `${channel.site}/${channel.site}.config.js`)
|
const configPath = path.resolve(SITES_DIR, `${channel.site}/${channel.site}.config.js`)
|
||||||
const config: SiteConfig = await this.configLoader.load(configPath)
|
const config: SiteConfig = await this.configLoader.load(configPath)
|
||||||
|
|
||||||
const found: ApiChannel = channels.first(
|
if (channel.xmltv_id) {
|
||||||
(_channel: ApiChannel) => _channel.id === channel.xmltv_id
|
const found: ApiChannel = channels.first(
|
||||||
)
|
(_channel: ApiChannel) => _channel.id === channel.xmltv_id
|
||||||
if (found) {
|
)
|
||||||
channel.logo = found.logo
|
if (found) {
|
||||||
channel.name = found.name
|
channel.logo = found.logo
|
||||||
|
channel.name = found.name
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
channel.xmltv_id = channel.site_id
|
||||||
}
|
}
|
||||||
|
|
||||||
const days = this.options.days || config.days || 1
|
const days = this.options.days || config.days || 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue