mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-10 17:10:07 -04:00
Delete flixed.io.config.js
This commit is contained in:
parent
1d1adcf1d2
commit
196434f5f6
1 changed files with 0 additions and 45 deletions
|
@ -1,45 +0,0 @@
|
||||||
const dayjs = require('dayjs')
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
site: 'flixed.io',
|
|
||||||
days: 1, // NOTE: changing the date in a request does not change the response
|
|
||||||
url: function ({ date, channel }) {
|
|
||||||
return `https://tv-guide.vercel.app/api/stationAirings?stationId=${
|
|
||||||
channel.site_id
|
|
||||||
}&startDateTime=${date.toJSON()}`
|
|
||||||
},
|
|
||||||
parser({ content }) {
|
|
||||||
let programs = []
|
|
||||||
let items = parseItems(content)
|
|
||||||
items.forEach(item => {
|
|
||||||
programs.push({
|
|
||||||
title: item.program.title,
|
|
||||||
description: item.program.longDescription,
|
|
||||||
category: item.program.subType,
|
|
||||||
image: parseImage(item),
|
|
||||||
start: parseStart(item),
|
|
||||||
stop: parseStop(item)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
|
|
||||||
return programs
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseImage(item) {
|
|
||||||
const uri = item.program.preferredImage.uri
|
|
||||||
|
|
||||||
return uri ? `https://adma.tmsimg.com/assets/${uri}` : null
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStart(item) {
|
|
||||||
return dayjs(item.startTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseStop(item) {
|
|
||||||
return dayjs(item.endTime)
|
|
||||||
}
|
|
||||||
|
|
||||||
function parseItems(content) {
|
|
||||||
return JSON.parse(content)
|
|
||||||
}
|
|
Loading…
Add table
Add a link
Reference in a new issue