mirror of
https://github.com/iptv-org/iptv
synced 2026-10-25 12:28:53 -04:00
Update clean.js
This commit is contained in:
1 parent
fe51790c35
commit
3a042b84d6
1 file changed
+2
-3
+2
-3
@@ -24,7 +24,7 @@ const instance = axios.create({
|
|||||||
rejectUnauthorized: false
|
rejectUnauthorized: false
|
||||||
}),
|
}),
|
||||||
validateStatus: function (status) {
|
validateStatus: function (status) {
|
||||||
return status !== 404
|
return status !== 404 && status < 500
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -101,8 +101,7 @@ async function checkStatus(playlist) {
|
|||||||
.then(utils.sleep(config.delay))
|
.then(utils.sleep(config.delay))
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
clearTimeout(timeout)
|
clearTimeout(timeout)
|
||||||
if (err.response && err.response.status === 404) {
|
if (err.response && (err.response.status === 404 || err.response.status >= 500)) {
|
||||||
//console.error(err)
|
|
||||||
if (config.debug) {
|
if (config.debug) {
|
||||||
console.info(` ${counter} ${chalk.red('offline')} ${chalk.white(channel.url)}`)
|
console.info(` ${counter} ${chalk.red('offline')} ${chalk.white(channel.url)}`)
|
||||||
stats.broken++
|
stats.broken++
|
||||||
|
|||||||
Reference in new issue
Block a user