Update i.mjh.nz.config.js

This commit is contained in:
Ismaël Moret 2024-12-19 15:58:18 +01:00 committed by GitHub
parent af932a972c
commit 51bbe74046
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -31,7 +31,8 @@ module.exports = {
...item,
title: getTitle(item),
description: getDescription(item),
categories: getCategories(item)
categories: getCategories(item),
icon: getIcon(item)
}
})
@ -160,6 +161,10 @@ function getCategories(item) {
return item.category.map(c => c.value)
}
function getIcon(item) {
return item.icon && item.icon.length ? item.icon[0].src : null
}
function parseItems(content, channel, date) {
try {
const curr_day = date