Merge branch 'master' into patch-1

This commit is contained in:
Shadix A 2021-06-08 15:32:22 +02:00 committed by GitHub
commit 9d64d110d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 10 deletions

View File

@ -10,7 +10,8 @@ jobs:
strategy:
fail-fast: false
matrix:
country: [
country:
[
ad,
ae,
af,
@ -166,8 +167,8 @@ jobs:
vn,
xk,
ye,
zm
# unsorted
zm,
unsorted
]
steps:
- name: Checkout

View File

@ -15,12 +15,16 @@ https://5d00db0e0fcd5.streamlock.net/7236/7236/playlist.m3u8
http://185.80.224.14:1935/live/smil:web.smil/playlist.m3u8
#EXTINF:-1 tvg-id="Channel117.al" tvg-name="Channel 117" tvg-country="AL" tvg-language="" tvg-logo="" group-title="",Channel 117
https://shkoder.gjirafa.com/api/media/rgjirafa/t0110y/1080/index.m3u8
#EXTINF:-1 tvg-id="FrameTV.al" tvg-name="Frame TV" tvg-country="AL" tvg-language="" tvg-logo="" group-title="",Frame TV
http://195.154.252.221:8000/play/a002/index.m3u8
#EXTINF:-1 tvg-id="KLAN.al" tvg-name="KLAN" tvg-country="AL" tvg-language="" tvg-logo="https://i.imgur.com/pWoMc0r.png" group-title="",KLAN
http://79.106.73.244:4040/live/klanhdmob/playlist.m3u8
#EXTINF:-1 tvg-id="KLANNews.al" tvg-name="KLAN News" tvg-country="AL" tvg-language="" tvg-logo="https://i.imgur.com/NMtr8Z4.jpg" group-title="",KLAN News
http://51.195.88.12:4050/live/klannewsmobpp3/playlist.m3u8
#EXTINF:-1 tvg-id="KLANPlus.al" tvg-name="KLAN Plus" tvg-country="AL" tvg-language="" tvg-logo="https://i.imgur.com/xg23eK4.jpg" group-title="",KLAN Plus
http://51.195.88.12:4050/live/klanplusmobpp3/playlist.m3u8
#EXTINF:-1 tvg-id="NeserTV.al" tvg-name="Nëser TV" tvg-country="AL" tvg-language="" tvg-logo="" group-title="",Nëser TV (Tirana)
http://195.154.252.221:8000/play/6355/index.m3u8
#EXTINF:-1 tvg-id="News24.al" tvg-name="News 24" tvg-country="AL" tvg-language="Albanian" tvg-logo="https://i.imgur.com/PWGMnzW.jpg" group-title="News",News 24 (576p)
http://tv.balkanweb.com:8081/news24/livestream/playlist.m3u8
#EXTINF:-1 tvg-id="RTVIlirida.al" tvg-name="RTV Ilirida" tvg-country="AL" tvg-language="Albanian" tvg-logo="" group-title="",RTV Ilirida (274p) [Not 24/7]

View File

@ -17,6 +17,7 @@ program
const config = program.opts()
const offlineStatusCodes = [404, 410, 500, 501]
const instance = axios.create({
timeout: config.timeout,
maxContentLength: 200000,
@ -24,7 +25,7 @@ const instance = axios.create({
rejectUnauthorized: false
}),
validateStatus: function (status) {
return status !== 404
return !offlineStatusCodes.includes(status)
}
})
@ -34,7 +35,7 @@ const stats = { broken: 0 }
async function main() {
console.info(`\nStarting...`)
console.time('Process completed in')
console.time('Done in')
if (config.debug) {
console.info(chalk.yellow(`INFO: Debug mode enabled\n`))
}
@ -101,12 +102,11 @@ 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 && offlineStatusCodes.includes(err.response.status)) {
if (config.debug) {
console.info(` ${counter} ${chalk.red('offline')} ${chalk.white(channel.url)}`)
stats.broken++
}
stats.broken++
} else {
results.push(channel)
if (config.debug) {
@ -131,7 +131,7 @@ async function savePlaylist(playlist) {
return false
} else {
utils.createFile(playlist.url, output)
console.info(`Playlist has been updated. Removed ${stats.broken} broken links.`)
console.info(`Playlist has been updated. Removed ${stats.broken} links.`)
}
return true
@ -142,7 +142,7 @@ async function done() {
}
function finish() {
console.timeEnd('Process completed in')
console.timeEnd('Done in')
}
main()