mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Merge pull request #2051 from xemles/master
Fixing timezones for 2 EPG (and typo on one)
This commit is contained in:
@@ -2,8 +2,10 @@ const axios = require('axios')
|
||||
const cheerio = require('cheerio')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
|
||||
module.exports = {
|
||||
site: 'canalplus-caraibes.com',
|
||||
@@ -74,11 +76,11 @@ function parseIcon(item) {
|
||||
return item.URLImage || item.URLImageDefault
|
||||
}
|
||||
function parseStart(item) {
|
||||
return dayjs.unix(item.startTime)
|
||||
return dayjs.unix(item.startTime).tz("America/Cayenne")
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.unix(item.endTime)
|
||||
return dayjs.unix(item.endTime).tz("America/Cayenne")
|
||||
}
|
||||
|
||||
function parseItems(content) {
|
||||
|
||||
@@ -4,6 +4,7 @@ const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
|
||||
module.exports = {
|
||||
site: 'canalplus-haiti.com',
|
||||
@@ -75,11 +76,11 @@ function parseIcon(item) {
|
||||
}
|
||||
|
||||
function parseStart(item) {
|
||||
return dayjs.unix(item.startTime)
|
||||
return dayjs.unix(item.startTime).tz("America/Port-au-Prince")
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.unix(item.endTime)
|
||||
return dayjs.unix(item.endTime).tz("America/Port-au-Prince")
|
||||
}
|
||||
|
||||
function parseItems(content) {
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
const axios = require('axios')
|
||||
const dayjs = require('dayjs')
|
||||
const utc = require('dayjs/plugin/utc')
|
||||
const timezone = require('dayjs/plugin/timezone')
|
||||
|
||||
dayjs.extend(utc)
|
||||
dayjs.extend(timezone)
|
||||
|
||||
module.exports = {
|
||||
site: 'canalplus-reunion.com',
|
||||
@@ -53,11 +55,11 @@ function parseIcon(item) {
|
||||
return item.URLImage || item.URLImageDefault
|
||||
}
|
||||
function parseStart(item) {
|
||||
return dayjs.unix(item.startTime)
|
||||
return dayjs.unix(item.startTime).tz("Indian/Reunion")
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return dayjs.unix(item.endTime)
|
||||
return dayjs.unix(item.endTime).tz("Indian/Reunion")
|
||||
}
|
||||
|
||||
function parseItems(content) {
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = {
|
||||
writer: parseCast(info,"Scénario :"),
|
||||
composer: parseCast(info,"Musique :"),
|
||||
presenter: parseCast(info,"Présenté par :"),
|
||||
date: paseDate(info),
|
||||
date: parseDate(info),
|
||||
rating: parseRating(info),
|
||||
start,
|
||||
stop
|
||||
@@ -108,7 +108,7 @@ function parseCast(info, type) {
|
||||
return people
|
||||
}
|
||||
|
||||
function paseDate(info) {
|
||||
function parseDate(info) {
|
||||
return (info && info.productionYear) ? info.productionYear : null
|
||||
}
|
||||
|
||||
@@ -125,4 +125,4 @@ function parseRating(info) {
|
||||
system: rating.authority,
|
||||
value: rating.value
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,7 +11,11 @@ module.exports = {
|
||||
request: {
|
||||
cache: {
|
||||
ttl: 60 * 60 * 1000 // 1 hour
|
||||
}
|
||||
},
|
||||
headers: {
|
||||
'Accept-Language':'en-US,en;q=0.5',
|
||||
'Connection':'keep-alive',
|
||||
},
|
||||
},
|
||||
url({ date, channel }) {
|
||||
const [channelId, childId] = channel.site_id.split('#')
|
||||
|
||||
Reference in New Issue
Block a user