From 10357289d369be21b81605f23963641edf4cdd54 Mon Sep 17 00:00:00 2001 From: freearhey Date: Thu, 6 May 2021 02:25:25 +0300 Subject: [PATCH] Update clean.js Ignore any error code except 404 --- scripts/clean.js | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/clean.js b/scripts/clean.js index 956220b670..7120053252 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -66,14 +66,19 @@ async function checkStatus(playlist) { ) { results.push(channel) } else { - const response = await instance + await instance .get(channel.url) + .then(() => { + results.push(channel) + }) .then(utils.sleep(config.delay)) - .catch(err => {}) - - if (response && response.status === 200) { - results.push(channel) - } + .catch(err => { + if (err.response && err.response.status === 404) { + //console.error(err) + } else { + results.push(channel) + } + }) } }