mirror of
https://github.com/iptv-org/iptv
synced 2026-10-28 22:04:31 -04:00
Moved skipPlaylist() function back
This commit is contained in:
1 parent
0040cde6c6
commit
1d9b6d7acf
1 file changed
+16
-1
+16
-1
@@ -229,6 +229,20 @@ function validateUrl(channelUrl) {
|
|||||||
return blacklist.indexOf(host) === -1
|
return blacklist.indexOf(host) === -1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function skipPlaylist(filename) {
|
||||||
|
let testCountry = process.env.npm_config_country
|
||||||
|
let excludeList = process.env.npm_config_exclude
|
||||||
|
let excludeCountries = excludeList ? excludeList.split(',') : []
|
||||||
|
|
||||||
|
if (testCountry && filename !== 'channels/' + testCountry + '.m3u') return true
|
||||||
|
|
||||||
|
for(const countryCode of excludeCountries) {
|
||||||
|
if (filename === 'channels/' + countryCode + '.m3u') return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
parsePlaylist,
|
parsePlaylist,
|
||||||
sortByTitleAndUrl,
|
sortByTitleAndUrl,
|
||||||
@@ -241,5 +255,6 @@ module.exports = {
|
|||||||
addToCache,
|
addToCache,
|
||||||
checkCache,
|
checkCache,
|
||||||
clearCache,
|
clearCache,
|
||||||
validateUrl
|
validateUrl,
|
||||||
|
skipPlaylist
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user