mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
feat: added icon tag to xml export for nostv, this will allow to work with tools like StreamMaster and Jellyfin
updated nostv image url
This commit is contained in:
parent
2721fe1ba0
commit
c021aa3e01
1 changed files with 11 additions and 8 deletions
|
@ -19,11 +19,10 @@ module.exports = {
|
||||||
site: 'nostv.pt',
|
site: 'nostv.pt',
|
||||||
days: 2,
|
days: 2,
|
||||||
url({ channel, date }) {
|
url({ channel, date }) {
|
||||||
return `https://api.clg.nos.pt/nostv/ott/schedule/range/contents/guest?channels=${
|
return `https://api.clg.nos.pt/nostv/ott/schedule/range/contents/guest?channels=${channel.site_id
|
||||||
channel.site_id
|
}&minDate=${date.format('YYYY-MM-DD')}T00:00:00Z&maxDate=${date.format(
|
||||||
}&minDate=${date.format('YYYY-MM-DD')}T00:00:00Z&maxDate=${date.format(
|
'YYYY-MM-DD'
|
||||||
'YYYY-MM-DD'
|
)}T23:59:59Z&isDateInclusive=true&client_id=${headers['X-Apikey']}`
|
||||||
)}T23:59:59Z&isDateInclusive=true&client_id=${headers['X-Apikey']}`
|
|
||||||
},
|
},
|
||||||
request: { headers },
|
request: { headers },
|
||||||
parser({ content }) {
|
parser({ content }) {
|
||||||
|
@ -31,15 +30,19 @@ module.exports = {
|
||||||
if (content) {
|
if (content) {
|
||||||
const items = Array.isArray(content) ? content : JSON.parse(content)
|
const items = Array.isArray(content) ? content : JSON.parse(content)
|
||||||
items.forEach(item => {
|
items.forEach(item => {
|
||||||
|
const image = item.Images
|
||||||
|
? `https://mage.stream.nos.pt/mage/v1/Images?sourceUri=${item.Images[0].Url}&profile=ott_1_452x340&client_id=${headers['X-Apikey']}`
|
||||||
|
: null
|
||||||
programs.push({
|
programs.push({
|
||||||
title: item.Metadata?.Title,
|
title: item.Metadata?.Title,
|
||||||
sub_title: item.Metadata?.SubTitle ? item.Metadata?.SubTitle : null,
|
sub_title: item.Metadata?.SubTitle ? item.Metadata?.SubTitle : null,
|
||||||
description: item.Metadata?.Description,
|
description: item.Metadata?.Description,
|
||||||
season: item.Metadata?.Season,
|
season: item.Metadata?.Season,
|
||||||
episode: item.Metadata?.Episode,
|
episode: item.Metadata?.Episode,
|
||||||
image: item.Images
|
icon: {
|
||||||
? `https://mage.stream.nos.pt/v1/nostv_mage/Images?sourceUri=${item.Images[0].Url}&profile=ott_1_452x340&client_id=${headers['X-Apikey']}`
|
src: image
|
||||||
: null,
|
},
|
||||||
|
image,
|
||||||
start: dayjs.utc(item.UtcDateTimeStart),
|
start: dayjs.utc(item.UtcDateTimeStart),
|
||||||
stop: dayjs.utc(item.UtcDateTimeEnd)
|
stop: dayjs.utc(item.UtcDateTimeEnd)
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue