mirror of https://github.com/iptv-org/iptv
Merge branch 'master' into LaneSh4d0w-patch-1
commit
15c223d557
@ -1,69 +1,380 @@
|
||||
[
|
||||
"Animal Planet",
|
||||
"Asian Food Network",
|
||||
"Cooking Channel",
|
||||
"Discovery Asia",
|
||||
"Discovery Channel",
|
||||
"Discovery Civiliztion",
|
||||
"Discovery en Espanol",
|
||||
"Discovery Family",
|
||||
"Discovery Historia",
|
||||
"Discovery History",
|
||||
"Discovery Home and Health",
|
||||
"Discovery Life",
|
||||
"Discovery Science",
|
||||
"Discovery Shed",
|
||||
"Discovery Theater",
|
||||
"Discovery Travel and Living",
|
||||
"Discovery Turbo Xtra",
|
||||
"Discovery World",
|
||||
"Discovery",
|
||||
"DIY Network",
|
||||
"DKiss",
|
||||
"DMax",
|
||||
"Eurosport 1",
|
||||
"Eurosport 2",
|
||||
"Eurosport",
|
||||
"eve",
|
||||
"Familia Discovery",
|
||||
"Fatafeat",
|
||||
"FEM",
|
||||
"Fine Living",
|
||||
"Food Network",
|
||||
"food tv",
|
||||
"foodtv",
|
||||
"Frisbee",
|
||||
"Giallo",
|
||||
"Golf TV",
|
||||
"GolfTV",
|
||||
"HGTV",
|
||||
"ID Investigation Discovery",
|
||||
"ID Investigation",
|
||||
"K2",
|
||||
"Living Channel",
|
||||
"Mango",
|
||||
"Motortrend",
|
||||
"Nove",
|
||||
"Oprah",
|
||||
"OWN",
|
||||
"Quest Red",
|
||||
"Quest",
|
||||
"Real Time",
|
||||
"Sky TG24",
|
||||
"TLC",
|
||||
"Trvl Channel",
|
||||
"TTV",
|
||||
"TV Norge",
|
||||
"Tvn 24 Bis",
|
||||
"TVN 24",
|
||||
"Tvn 7",
|
||||
"TVN Extra",
|
||||
"TVN Fabula",
|
||||
"TVN Meteo",
|
||||
"TVN Style",
|
||||
"TVN Turbo",
|
||||
"TVN Warszawa",
|
||||
"TVN",
|
||||
"Vox",
|
||||
"World Discovery"
|
||||
{
|
||||
"name": "Animal Planet",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Asian Food Network",
|
||||
"country": "sg",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Cooking Channel",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Asia",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Channel",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Civiliztion",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery en Espanol",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Family",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Historia",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery History",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Home and Health",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Life",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Science",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Shed",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Theater",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Travel and Living",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery Turbo Xtra",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery World",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Discovery",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "DIY Network",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "DKiss",
|
||||
"country": "es",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "DMax",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Eurosport 1",
|
||||
"country": "fr",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Eurosport 2",
|
||||
"country": "fr",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Eurosport",
|
||||
"country": "fr",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "eve",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Familia Discovery",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Fatafeat",
|
||||
"country": "eg",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "FEM",
|
||||
"country": "no",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Fine Living",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Food Network",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "food tv",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": ["foodtv"]
|
||||
},
|
||||
{
|
||||
"name": "Frisbee",
|
||||
"country": "it",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Giallo",
|
||||
"country": "it",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "GolfTV",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": ["Golf TV"]
|
||||
},
|
||||
{
|
||||
"name": "HGTV",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Investigation Discovery",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": ["ID Investigation Discovery", "ID Investigation", "ID"]
|
||||
},
|
||||
{
|
||||
"name": "K2",
|
||||
"country": "it",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Living Channel",
|
||||
"country": "nz",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Mango",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Motortrend",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Nove",
|
||||
"country": "it",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "OWN",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": ["Oprah"]
|
||||
},
|
||||
{
|
||||
"name": "Quest Red",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Quest",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Real Time",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Sky TG24",
|
||||
"country": "it",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/pull/2294",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TLC",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Trvl Channel",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TTV",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TV Norge",
|
||||
"country": "no",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Tvn 24 Bis",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN 24",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Tvn 7",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Extra",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Fabula",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Meteo",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Style",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Turbo",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN Warszawa",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "TVN",
|
||||
"country": "pl",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "Vox",
|
||||
"country": "no",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
},
|
||||
{
|
||||
"name": "World Discovery",
|
||||
"country": "us",
|
||||
"dmca_notice": "https://github.com/iptv-org/iptv/issues/1831",
|
||||
"aliases": []
|
||||
}
|
||||
]
|
||||
|
@ -0,0 +1,67 @@
|
||||
const parser = require('./parser')
|
||||
const utils = require('./utils')
|
||||
const blacklist = require('./blacklist.json')
|
||||
|
||||
async function main() {
|
||||
const playlists = parseIndex()
|
||||
for (const playlist of playlists) {
|
||||
await loadPlaylist(playlist.url).then(removeBlacklisted).then(savePlaylist).then(done)
|
||||
}
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
function parseIndex() {
|
||||
console.info(`Parsing 'index.m3u'...`)
|
||||
let playlists = parser.parseIndex()
|
||||
console.info(`Found ${playlists.length} playlist(s)\n`)
|
||||
|
||||
return playlists
|
||||
}
|
||||
|
||||
async function loadPlaylist(url) {
|
||||
console.info(`Processing '${url}'...`)
|
||||
return parser.parsePlaylist(url)
|
||||
}
|
||||
|
||||
async function removeBlacklisted(playlist) {
|
||||
console.info(` Looking for blacklisted channels...`)
|
||||
playlist.channels = playlist.channels.filter(channel => {
|
||||
return !blacklist.find(i => {
|
||||
const channelName = channel.name.toLowerCase()
|
||||
return (
|
||||
(i.name.toLowerCase() === channelName ||
|
||||
i.aliases.map(i => i.toLowerCase()).includes(channelName)) &&
|
||||
i.country === channel.filename
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
return playlist
|
||||
}
|
||||
|
||||
async function savePlaylist(playlist) {
|
||||
console.info(` Saving playlist...`)
|
||||
const original = utils.readFile(playlist.url)
|
||||
const output = playlist.toString({ raw: true })
|
||||
|
||||
if (original === output) {
|
||||
console.info(`No changes have been made.`)
|
||||
return false
|
||||
} else {
|
||||
utils.createFile(playlist.url, output)
|
||||
console.info(`Playlist has been updated.`)
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
async function done() {
|
||||
console.info(` `)
|
||||
}
|
||||
|
||||
function finish() {
|
||||
console.info('Done.')
|
||||
}
|
||||
|
||||
main()
|
Loading…
Reference in New Issue