Update detect-resolution.js

This commit is contained in:
Aleksandr Statciuk 2021-08-06 07:49:39 +03:00
parent ee591096c1
commit 546c8ff7b1
1 changed files with 5 additions and 1 deletions

View File

@ -15,6 +15,7 @@ program
.parse(process.argv)
const config = program.opts()
const ignoreStatus = ['Offline']
const instance = axios.create({
timeout: config.timeout,
maxContentLength: 200000,
@ -50,7 +51,10 @@ async function detectResolution(playlist) {
let updated = false
for (const channel of playlist.channels) {
bar.tick()
if (!channel.resolution.height) {
const skipChannel =
channel.status &&
ignoreStatus.map(i => i.toLowerCase()).includes(channel.status.toLowerCase())
if (!channel.resolution.height && !skipChannel) {
const CancelToken = axios.CancelToken
const source = CancelToken.source()
const timeout = setTimeout(() => {