mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 00:50:09 -04:00
Update digiturk.com.tr.config.js
This commit is contained in:
parent
57385b4359
commit
7ba13812bb
1 changed files with 6 additions and 3 deletions
|
@ -10,6 +10,9 @@ module.exports = {
|
||||||
channel.site_id
|
channel.site_id
|
||||||
}/${date.format('YYYY-MM-DD')}/0`
|
}/${date.format('YYYY-MM-DD')}/0`
|
||||||
},
|
},
|
||||||
|
logo({ channel }) {
|
||||||
|
return channel.logo
|
||||||
|
},
|
||||||
parser: function ({ content, channel }) {
|
parser: function ({ content, channel }) {
|
||||||
const programs = []
|
const programs = []
|
||||||
const items = parseItems(content, channel)
|
const items = parseItems(content, channel)
|
||||||
|
@ -18,8 +21,8 @@ module.exports = {
|
||||||
title: item.ProgramName,
|
title: item.ProgramName,
|
||||||
description: item.LongDescription,
|
description: item.LongDescription,
|
||||||
category: parseCategory(item),
|
category: parseCategory(item),
|
||||||
start: parseStart(item),
|
start: parseStart(item).toJSON(),
|
||||||
stop: parseStop(item)
|
stop: parseStop(item).toJSON()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -64,7 +67,7 @@ function parseCategory(item) {
|
||||||
function parseItems(content, channel) {
|
function parseItems(content, channel) {
|
||||||
const data = JSON.parse(content)
|
const data = JSON.parse(content)
|
||||||
const items = data.listings[channel.site_id]
|
const items = data.listings[channel.site_id]
|
||||||
if (!items.length) return []
|
if (!Array.isArray(items)) return []
|
||||||
|
|
||||||
return items
|
return items
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue