Update format.js

This commit is contained in:
Aleksandr Statciuk 2021-11-03 12:42:50 +03:00
parent 73e0ea9223
commit 019a63e567
1 changed files with 4 additions and 3 deletions

View File

@ -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,13 +128,14 @@ function updateOrigins(channel, requests) {
function updateStatus(channel, status) { function updateStatus(channel, status) {
switch (status) { switch (status) {
case 'online': case 'online':
if (channel.status !== 'Not 24/7')
channel.status = channel.status === 'Offline' ? 'Not 24/7' : null channel.status = channel.status === 'Offline' ? 'Not 24/7' : null
break break
case 'error_403': case 'error_403':
channel.status = 'Geo-blocked' channel.status = 'Geo-blocked'
break break
case 'offline': case 'offline':
channel.status = 'Offline' if (channel.status !== 'Not 24/7') channel.status = 'Offline'
break break
} }
} }