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

@@ -27,7 +27,7 @@ module.exports = {
'YYYY-MM-DD'
)}${packageName}&country=${region}`
},
async parser({ content, channel, cached }) {
async parser({ content, channel }) {
let programs = []
const items = parseItems(content, channel)
for (const item of items) {
@@ -91,7 +91,7 @@ async function loadProgramDetails(item) {
}
function parseItems(content, channel) {
const [_, channelId] = channel.site_id.split('#')
const [, channelId] = channel.site_id.split('#')
const data = JSON.parse(content)
if (!data || !Array.isArray(data.Channels)) return []
const channelData = data.Channels.find(c => c.Number === channelId)