|
|
@ -33,8 +33,8 @@ async function test() {
|
|
|
|
|
|
|
|
|
|
|
|
for(let country of countries) {
|
|
|
|
for(let country of countries) {
|
|
|
|
|
|
|
|
|
|
|
|
if (skipPlaylist(country.url)) {
|
|
|
|
if (util.skipPlaylist(country.url)) {
|
|
|
|
continue;
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
console.log(`Checking '${country.url}'...`)
|
|
|
|
console.log(`Checking '${country.url}'...`)
|
|
|
@ -94,11 +94,3 @@ function writeToLog(country, msg, url) {
|
|
|
|
util.appendToFile(errorLog, now.toISOString() + ' ' + line + '\n')
|
|
|
|
util.appendToFile(errorLog, now.toISOString() + ' ' + line + '\n')
|
|
|
|
console.log(`Error: ${msg} '${url}'`)
|
|
|
|
console.log(`Error: ${msg} '${url}'`)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
function skipPlaylist(filename) {
|
|
|
|
|
|
|
|
let test_country = process.env.npm_config_country
|
|
|
|
|
|
|
|
if (test_country && filename !== 'channels/' + test_country + '.m3u') {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|