mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Update update-api.js
This commit is contained in:
parent
b64b9878a4
commit
d2946dfa7a
2 changed files with 4 additions and 2 deletions
|
@ -40,13 +40,15 @@ async function loadPrograms() {
|
|||
let items = await db.programs.find({})
|
||||
|
||||
items = items.map(item => {
|
||||
const categories = Array.isArray(item.category) ? item.category : [item.category]
|
||||
|
||||
return {
|
||||
channel: item.channel,
|
||||
site: item.site,
|
||||
lang: item.lang,
|
||||
title: item.title,
|
||||
desc: item.description || null,
|
||||
categories: item.category || [],
|
||||
categories: categories.filter(i => i),
|
||||
season: item.season || null,
|
||||
episode: item.episode || null,
|
||||
image: item.icon || null,
|
||||
|
|
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue