From 68835226ef5c0e42308881fd7bbcfe5c7a17b3c4 Mon Sep 17 00:00:00 2001 From: freearhey Date: Mon, 9 Sep 2019 04:02:40 +0300 Subject: [PATCH] Moved skipPlaylist() back to util.js --- test/index.js | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/test/index.js b/test/index.js index 87bac81f67..6f79064d86 100644 --- a/test/index.js +++ b/test/index.js @@ -41,7 +41,7 @@ async function test() { for(let country of countries) { - if (skipPlaylist(country.url)) { + if (util.skipPlaylist(country.url)) { continue } @@ -114,16 +114,3 @@ function writeToLog(country, msg, url) { util.appendToFile(errorLog, now.toISOString() + ' ' + line + '\n') console.log(`Error: ${msg} '${url}'`) } - -function skipPlaylist(filename) { - let testCountry = process.env.npm_config_country - let excludeCountries = process.env.npm_config_exclude.split(',') - - if (testCountry && filename !== 'channels/' + testCountry + '.m3u') return true - - for(const countryCode of excludeCountries) { - if (filename === 'channels/' + countryCode + '.m3u') return true - } - - return false -} \ No newline at end of file