mirror of
https://github.com/iptv-org/epg
synced 2025-12-17 10:56:57 -05:00
Update create-database.js
This commit is contained in:
@@ -42,6 +42,7 @@ async function getChannels() {
|
|||||||
const groupId = `${region}/${site}`
|
const groupId = `${region}/${site}`
|
||||||
const items = await parser.parseChannels(filepath)
|
const items = await parser.parseChannels(filepath)
|
||||||
for (const item of items) {
|
for (const item of items) {
|
||||||
|
if (!item.site || !item.site_id || !item.xmltv_id || !item.name) continue
|
||||||
const key = `${item.site}:${item.site_id}`
|
const key = `${item.site}:${item.site_id}`
|
||||||
if (!channels[key]) {
|
if (!channels[key]) {
|
||||||
const countryCode = item.xmltv_id.split('.')[1]
|
const countryCode = item.xmltv_id.split('.')[1]
|
||||||
|
|||||||
Reference in New Issue
Block a user