mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 09:30:06 -04:00
Fix linter issues in sites/
This commit is contained in:
parent
d6d20b6413
commit
5df982bb7c
129 changed files with 3316 additions and 3226 deletions
|
@ -12,9 +12,7 @@ module.exports = {
|
|||
site: 'sky.com',
|
||||
days: 2,
|
||||
url({ date, channel }) {
|
||||
return `https://awk.epgsky.com/hawk/linear/schedule/${
|
||||
date.format('YYYYMMDD')
|
||||
}/${
|
||||
return `https://awk.epgsky.com/hawk/linear/schedule/${date.format('YYYYMMDD')}/${
|
||||
channel.site_id
|
||||
}`
|
||||
},
|
||||
|
@ -27,19 +25,18 @@ module.exports = {
|
|||
.filter(schedule => schedule.sid === channel.site_id)
|
||||
.forEach(schedule => {
|
||||
if (Array.isArray(schedule.events)) {
|
||||
schedule.events
|
||||
.forEach(event => {
|
||||
const start = dayjs.utc(event.st * 1000)
|
||||
const stop = start.add(event.d, 's')
|
||||
programs.push({
|
||||
title: event.t,
|
||||
description: event.sy,
|
||||
season: event.seasonnumber,
|
||||
episode: event.episodenumber,
|
||||
start,
|
||||
stop
|
||||
})
|
||||
schedule.events.forEach(event => {
|
||||
const start = dayjs.utc(event.st * 1000)
|
||||
const stop = start.add(event.d, 's')
|
||||
programs.push({
|
||||
title: event.t,
|
||||
description: event.sy,
|
||||
season: event.seasonnumber,
|
||||
episode: event.episodenumber,
|
||||
start,
|
||||
stop
|
||||
})
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -55,10 +52,12 @@ module.exports = {
|
|||
if (queue.t === 'r') {
|
||||
const $ = cheerio.load(res)
|
||||
const initialData = JSON.parse(decodeURIComponent($('#initialData').text()))
|
||||
initialData.state.epgData.regions
|
||||
.forEach(region => {
|
||||
queues.push({ t: 'c', url: `https://awk.epgsky.com/hawk/linear/services/${region.bouquet}/${region.subBouquet}` })
|
||||
initialData.state.epgData.regions.forEach(region => {
|
||||
queues.push({
|
||||
t: 'c',
|
||||
url: `https://awk.epgsky.com/hawk/linear/services/${region.bouquet}/${region.subBouquet}`
|
||||
})
|
||||
})
|
||||
}
|
||||
// process channels
|
||||
if (queue.t === 'c') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue