mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 10:26:41 -05:00
Update create.js
This commit is contained in:
@@ -44,8 +44,6 @@ async function createQueue() {
|
|||||||
const config = require(file.resolve(configPath))
|
const config = require(file.resolve(configPath))
|
||||||
if (config.skip) continue
|
if (config.skip) continue
|
||||||
const filename = file.basename(filepath)
|
const filename = file.basename(filepath)
|
||||||
const [__, region] = filename.match(/_([a-z-]+)\.channels\.xml/i) || [null, null]
|
|
||||||
const groupId = `${region}/${site}`
|
|
||||||
for (const channel of channels) {
|
for (const channel of channels) {
|
||||||
if (!channel.site || !channel.id) continue
|
if (!channel.site || !channel.id) continue
|
||||||
const found = api.channels.find({ id: channel.id })
|
const found = api.channels.find({ id: channel.id })
|
||||||
@@ -59,14 +57,9 @@ async function createQueue() {
|
|||||||
channel,
|
channel,
|
||||||
date: dString,
|
date: dString,
|
||||||
configPath,
|
configPath,
|
||||||
groups: [],
|
|
||||||
error: null
|
error: null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!queue[key].groups.includes(groupId)) {
|
|
||||||
queue[key].groups.push(groupId)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
|||||||
Reference in New Issue
Block a user