From c03b55812f7aeb45eb61981a4f3eedec08756c66 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Mon, 7 Jun 2021 14:54:42 +0300 Subject: [PATCH] Update clean.js --- scripts/clean.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/clean.js b/scripts/clean.js index 2288af6207..32f79cee9b 100644 --- a/scripts/clean.js +++ b/scripts/clean.js @@ -24,7 +24,7 @@ const instance = axios.create({ rejectUnauthorized: false }), validateStatus: function (status) { - return status !== 404 + return status !== 404 && status < 500 } }) @@ -101,8 +101,7 @@ async function checkStatus(playlist) { .then(utils.sleep(config.delay)) .catch(err => { clearTimeout(timeout) - if (err.response && err.response.status === 404) { - //console.error(err) + if (err.response && (err.response.status === 404 || err.response.status >= 500)) { if (config.debug) { console.info(` ${counter} ${chalk.red('offline')} ${chalk.white(channel.url)}`) stats.broken++