Update index.js

- moved skipPlaylist() function to util.js
- remove extra character
This commit is contained in:
freearhey 2019-08-12 15:34:42 +03:00
parent b3d43e90eb
commit 6f484406fc

View File

@ -33,8 +33,8 @@ async function test() {
for(let country of countries) {
if (skipPlaylist(country.url)) {
continue;
if (util.skipPlaylist(country.url)) {
continue
}
console.log(`Checking '${country.url}'...`)
@ -94,11 +94,3 @@ function writeToLog(country, msg, url) {
util.appendToFile(errorLog, now.toISOString() + ' ' + line + '\n')
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;
}