Merge pull request #22 from mephist/master

Test only a specific country code via TEST_COUNTRY=xx env variable
pull/40/head
Aleksandr Statciuk 6 years ago committed by GitHub
commit 823c2d44a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
.gitignore vendored

@ -1,2 +1,3 @@
node_modules/
error.log
error.log
*~

@ -22,6 +22,14 @@ function writeToLog(test, country, msg, url) {
console.log(line)
}
function skipPlaylist(filename) {
let test_country = process.env.TEST_COUNTRY
if (test_country && filename !== 'channels/' + test_country + '.m3u') {
return true;
}
return false;
}
function loadPlaylist(filename) {
return M3U.parse(fs.readFileSync(path.resolve(__dirname) + "/../" + filename, { encoding: "utf8" }))
}
@ -35,6 +43,10 @@ async function testAllLinksIsWorking() {
for(let country of countries) {
if (skipPlaylist(country.file)) {
continue;
}
const playlist = loadPlaylist(country.file)
for(let channel of playlist) {

Loading…
Cancel
Save