From 6f484406fc2b3fb6740945c60c312e1876adc6c2 Mon Sep 17 00:00:00 2001 From: freearhey Date: Mon, 12 Aug 2019 15:34:42 +0300 Subject: [PATCH] Update index.js - moved skipPlaylist() function to util.js - remove extra character --- test/index.js | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/test/index.js b/test/index.js index e03ed8c25..99570bbeb 100644 --- a/test/index.js +++ b/test/index.js @@ -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; -}