mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 02:20:03 -04:00
Update util.js
Added skipPlaylist() function
This commit is contained in:
parent
6f484406fc
commit
b648f5fce8
1 changed files with 10 additions and 1 deletions
|
@ -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
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue