Update clean.js

Ignore any error code except 404
what-a-patch-1
freearhey 5 years ago
parent 9f8bf13bbf
commit c5e898a9d5

@ -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)
}
})
}
}

Loading…
Cancel
Save