mirror of
https://github.com/iptv-org/epg
synced 2026-05-04 08:26:59 -04:00
Parse season and episode for visionplus.id.
Signed-off-by: Toha <tohenk@yahoo.com>
This commit is contained in:
@@ -28,10 +28,14 @@ module.exports = {
|
||||
if (Array.isArray(json.evs)) {
|
||||
for (const ev of json.evs) {
|
||||
if (ev.sid === channel.site_id) {
|
||||
const title = ev.con && ev.con.loc ? ev.con.loc[0].tit : ev.con.oti
|
||||
const [, , season, , episode] = title.match(/( S(\d+))?(, Ep (\d+))/) || [null, null, null, null, null]
|
||||
programs.push({
|
||||
title: ev.con && ev.con.loc ? ev.con.loc[0].tit : ev.con.oti,
|
||||
title,
|
||||
description: ev.con && ev.con.loc ? ev.con.loc[0].syn : null,
|
||||
categories: ev.con ? ev.con.categories : null,
|
||||
season: season ? parseInt(season) : season,
|
||||
episode: episode ? parseInt(episode) : episode,
|
||||
start: dayjs(ev.sta),
|
||||
stop: dayjs(ev.end)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user