Update util.js

Added skipPlaylist() function
This commit is contained in:
freearhey 2019-08-12 15:34:56 +03:00
parent 6f484406fc
commit b648f5fce8
1 changed files with 10 additions and 1 deletions

View File

@ -217,6 +217,14 @@ function validateUrl(channelUrl) {
return blacklist.indexOf(host) === -1 return blacklist.indexOf(host) === -1
} }
function skipPlaylist(filename) {
let test_country = process.env.npm_config_country
if (test_country && filename !== 'channels/' + test_country + '.m3u') {
return true;
}
return false;
}
module.exports = { module.exports = {
parsePlaylist, parsePlaylist,
sortByTitle, sortByTitle,
@ -229,5 +237,6 @@ module.exports = {
addToCache, addToCache,
checkCache, checkCache,
clearCache, clearCache,
validateUrl validateUrl,
skipPlaylist
} }