Merge pull request #5282 from iptv-org/update-format-js
Update format.js
This commit is contained in:
commit
82537178a6
|
@ -8,7 +8,7 @@ const file = require('./helpers/file')
|
||||||
const log = require('./helpers/log')
|
const log = require('./helpers/log')
|
||||||
const epg = require('./helpers/epg')
|
const epg = require('./helpers/epg')
|
||||||
|
|
||||||
const ignoreStatus = ['Geo-blocked', 'Not 24/7']
|
const ignoreStatus = ['Geo-blocked']
|
||||||
|
|
||||||
program
|
program
|
||||||
.usage('[OPTIONS]...')
|
.usage('[OPTIONS]...')
|
||||||
|
@ -128,11 +128,14 @@ function updateOrigins(channel, requests) {
|
||||||
function updateStatus(channel, status) {
|
function updateStatus(channel, status) {
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case 'online':
|
case 'online':
|
||||||
channel.status = channel.status === 'Offline' ? 'Not 24/7' : null
|
if (channel.status !== 'Not 24/7')
|
||||||
|
channel.status = channel.status === 'Offline' ? 'Not 24/7' : null
|
||||||
|
break
|
||||||
|
case 'error_403':
|
||||||
|
channel.status = 'Geo-blocked'
|
||||||
break
|
break
|
||||||
case 'offline':
|
case 'offline':
|
||||||
case 'error_403':
|
if (channel.status !== 'Not 24/7') channel.status = 'Offline'
|
||||||
channel.status = 'Offline'
|
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue