mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-11 01:20:08 -04:00
Merge pull request #105 from iptv-org/update-arianatelevision-com
Update arianatelevision.com.config.js
This commit is contained in:
commit
bf717ec8e9
3 changed files with 12 additions and 10 deletions
12
package-lock.json
generated
12
package-lock.json
generated
|
@ -637,7 +637,9 @@
|
|||
"version": "1.3.0",
|
||||
"resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz",
|
||||
"integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=",
|
||||
"engines": ["node >=0.6.0"]
|
||||
"engines": [
|
||||
"node >=0.6.0"
|
||||
]
|
||||
},
|
||||
"node_modules/fast-deep-equal": {
|
||||
"version": "3.1.3",
|
||||
|
@ -968,7 +970,9 @@
|
|||
"version": "1.4.1",
|
||||
"resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||||
"integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=",
|
||||
"engines": ["node >=0.6.0"],
|
||||
"engines": [
|
||||
"node >=0.6.0"
|
||||
],
|
||||
"dependencies": {
|
||||
"assert-plus": "1.0.0",
|
||||
"extsprintf": "1.3.0",
|
||||
|
@ -1484,7 +1488,9 @@
|
|||
"version": "1.10.0",
|
||||
"resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz",
|
||||
"integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=",
|
||||
"engines": ["node >=0.6.0"],
|
||||
"engines": [
|
||||
"node >=0.6.0"
|
||||
],
|
||||
"dependencies": {
|
||||
"assert-plus": "^1.0.0",
|
||||
"core-util-is": "1.0.2",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="arianatelevision.com">
|
||||
<channels>
|
||||
<channel site_id="#" xmltv_id="ArianaTVNational.af">Ariana TV National</channel>
|
||||
<channel site_id="#" xmltv_id="ArianaTVNational.af" logo="https://www.arianatelevision.com/wp-content/uploads/2017/08/logo-atn-new.png">Ariana TV National</channel>
|
||||
</channels>
|
||||
</site>
|
|
@ -10,7 +10,6 @@ dayjs.extend(utc)
|
|||
dayjs.extend(timezone)
|
||||
dayjs.extend(customParseFormat)
|
||||
|
||||
let PM = false
|
||||
module.exports = {
|
||||
lang: 'en',
|
||||
days: 7,
|
||||
|
@ -21,6 +20,7 @@ module.exports = {
|
|||
return `https://www.arianatelevision.com/program-schedule/`
|
||||
},
|
||||
parser({ content, date }) {
|
||||
let PM = false
|
||||
const programs = []
|
||||
const items = parseItems(content, date)
|
||||
items.forEach(item => {
|
||||
|
@ -28,7 +28,7 @@ module.exports = {
|
|||
let start = parseStart(item, date)
|
||||
if (start.hour() > 11) PM = true
|
||||
if (start.hour() < 12 && PM) start = start.add(1, 'd')
|
||||
const stop = parseStop(item, date)
|
||||
const stop = start.add(30, 'm')
|
||||
if (programs.length) {
|
||||
programs[programs.length - 1].stop = start
|
||||
}
|
||||
|
@ -44,10 +44,6 @@ module.exports = {
|
|||
}
|
||||
}
|
||||
|
||||
function parseStop(item, date) {
|
||||
return date.tz('Asia/Kabul').endOf('d').add(6, 'h')
|
||||
}
|
||||
|
||||
function parseStart(item, date) {
|
||||
const time = `${date.format('MM/DD/YYYY')} ${item.start}`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue