Update /sites

This commit is contained in:
freearhey
2023-10-02 06:35:33 +03:00
parent ca254a6df0
commit c0cfcf7a47
543 changed files with 30781 additions and 31187 deletions

View File

@@ -1,7 +1,7 @@
const axios = require('axios')
const dayjs = require('dayjs')
const API_ENDPOINT = `https://legacy-static.oesp.horizon.tv/oesp/v4/SK/slk/web`
const API_ENDPOINT = 'https://legacy-static.oesp.horizon.tv/oesp/v4/SK/slk/web'
module.exports = {
site: 'horizon.tv',
@@ -87,7 +87,7 @@ function parseStop(item) {
function parseItems(content, channel) {
if (!content) return []
const data = (typeof content === 'string') ? JSON.parse(content) : content
const data = typeof content === 'string' ? JSON.parse(content) : content
if (!data || !Array.isArray(data.entries)) return []
const entity = data.entries.find(e => e.o === `lgi-obolite-sk-prod-master:${channel.site_id}`)
return entity ? entity.l : []
@@ -142,4 +142,4 @@ function parseYear(detail) {
if (!detail) return null
if (!detail.program) return null
return detail.program.year || null
}
}