mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-13 10:30:03 -04:00
wip
This commit is contained in:
parent
db008d61fb
commit
fc469c0568
2 changed files with 187 additions and 163 deletions
|
@ -147,6 +147,20 @@ helper.validateUrl = function(channelUrl) {
|
|||
return blacklist.indexOf(host) === -1
|
||||
}
|
||||
|
||||
helper.filterPlaylists = function(arr, include = '', exclude = '') {
|
||||
if(include) {
|
||||
const included = include.split(',').map(filename => `channels/${filename}.m3u`)
|
||||
|
||||
return arr.filter(i => included.indexOf(i.url) > -1)
|
||||
}
|
||||
|
||||
if(exclude) {
|
||||
const excluded = exclude.split(',').map(filename => `channels/${filename}.m3u`)
|
||||
|
||||
return arr.filter(i => excluded.indexOf(i.url) === -1)
|
||||
}
|
||||
}
|
||||
|
||||
helper.skipPlaylist = function(filename) {
|
||||
let testCountry = process.env.npm_config_country
|
||||
let excludeList = process.env.npm_config_exclude
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue