Merge branch 'master' of github.com:iptv-org/iptv
This commit is contained in:
commit
84d99c3312
|
@ -32,6 +32,6 @@
|
|||
<tr><td align="left">Travel</td><td align="right">8</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/travel.m3u</code></td></tr>
|
||||
<tr><td align="left">Weather</td><td align="right">4</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/weather.m3u</code></td></tr>
|
||||
<tr><td align="left">XXX</td><td align="right">70</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/xxx.m3u</code></td></tr>
|
||||
<tr><td align="left">Other</td><td align="right">2844</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/other.m3u</code></td></tr>
|
||||
<tr><td align="left">Other</td><td align="right">2848</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/other.m3u</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
|
@ -38,7 +38,7 @@
|
|||
<tr><td align="left">🇧🇮 Burundi</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/bi.m3u</code></td></tr>
|
||||
<tr><td align="left">🇰🇭 Cambodia</td><td align="right">12</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/kh.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇲 Cameroon</td><td align="right">8</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cm.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇦 Canada</td><td align="right">41</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ca.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇦 Canada</td><td align="right">45</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ca.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇻 Cape Verde</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cv.m3u</code></td></tr>
|
||||
<tr><td align="left">🇰🇾 Cayman Islands</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ky.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇫 Central African Republic</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cf.m3u</code></td></tr>
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
<tr><td align="left">Czech</td><td align="right">19</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/ces.m3u</code></td></tr>
|
||||
<tr><td align="left">Danish</td><td align="right">12</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/dan.m3u</code></td></tr>
|
||||
<tr><td align="left">Dutch</td><td align="right">67</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/nld.m3u</code></td></tr>
|
||||
<tr><td align="left">English</td><td align="right">735</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/eng.m3u</code></td></tr>
|
||||
<tr><td align="left">English</td><td align="right">739</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/eng.m3u</code></td></tr>
|
||||
<tr><td align="left">Estonian</td><td align="right">3</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/est.m3u</code></td></tr>
|
||||
<tr><td align="left">Faroese</td><td align="right">1</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/fao.m3u</code></td></tr>
|
||||
<tr><td align="left">Finnish</td><td align="right">3</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/fin.m3u</code></td></tr>
|
||||
|
|
|
@ -55,7 +55,7 @@ Or select one of the playlists from the list below.
|
|||
<tr><td align="left">Travel</td><td align="right">8</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/travel.m3u</code></td></tr>
|
||||
<tr><td align="left">Weather</td><td align="right">4</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/weather.m3u</code></td></tr>
|
||||
<tr><td align="left">XXX</td><td align="right">70</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/xxx.m3u</code></td></tr>
|
||||
<tr><td align="left">Other</td><td align="right">2844</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/other.m3u</code></td></tr>
|
||||
<tr><td align="left">Other</td><td align="right">2848</td><td align="left"><code>https://iptv-org.github.io/iptv/categories/other.m3u</code></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
|
@ -84,7 +84,7 @@ Or select one of the playlists from the list below.
|
|||
<tr><td align="left">Czech</td><td align="right">19</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/ces.m3u</code></td></tr>
|
||||
<tr><td align="left">Danish</td><td align="right">12</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/dan.m3u</code></td></tr>
|
||||
<tr><td align="left">Dutch</td><td align="right">67</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/nld.m3u</code></td></tr>
|
||||
<tr><td align="left">English</td><td align="right">735</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/eng.m3u</code></td></tr>
|
||||
<tr><td align="left">English</td><td align="right">739</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/eng.m3u</code></td></tr>
|
||||
<tr><td align="left">Estonian</td><td align="right">3</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/est.m3u</code></td></tr>
|
||||
<tr><td align="left">Faroese</td><td align="right">1</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/fao.m3u</code></td></tr>
|
||||
<tr><td align="left">Finnish</td><td align="right">3</td><td align="left"><code>https://iptv-org.github.io/iptv/languages/fin.m3u</code></td></tr>
|
||||
|
@ -194,7 +194,7 @@ Or select one of the playlists from the list below.
|
|||
<tr><td align="left">🇧🇮 Burundi</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/bi.m3u</code></td></tr>
|
||||
<tr><td align="left">🇰🇭 Cambodia</td><td align="right">12</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/kh.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇲 Cameroon</td><td align="right">8</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cm.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇦 Canada</td><td align="right">41</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ca.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇦 Canada</td><td align="right">45</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ca.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇻 Cape Verde</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cv.m3u</code></td></tr>
|
||||
<tr><td align="left">🇰🇾 Cayman Islands</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/ky.m3u</code></td></tr>
|
||||
<tr><td align="left">🇨🇫 Central African Republic</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/countries/cf.m3u</code></td></tr>
|
||||
|
|
|
@ -17,8 +17,14 @@ http://142.112.39.133:8080/catv.mp4
|
|||
https://hls.savoir.media/live/stream.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="News",CBC News Network
|
||||
https://cbcnewshd-f.akamaihd.net/i/cbcnews_30@304030/index_2500_av-p.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CBC Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-ydcl2V1MVC/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CityTV Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-iSykLSKMFr/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="French" tvg-logo="https://i.imgur.com/wwmapsS.png" group-title="Legislative",CPAC (720p)
|
||||
https://bcsecurelivehls-i.akamaihd.net/hls/live/680604/1242843915001_3/master.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CTV Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-zxsJFt6VvY/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="Urdu" tvg-logo="" group-title="",Eawaz TV (720p)
|
||||
https://streamer12.vdn.dstreamone.net/saazoawaz/saazoawaz/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="French" tvg-logo="https://i.imgur.com/HRqcIcR.png" group-title="",EMCI TV (1080p)
|
||||
|
@ -75,17 +81,11 @@ http://toronto3.live247stream.com/toronto360/tv/playlist.m3u8
|
|||
https://tscstreaming-lh.akamaihd.net/i/TSCLiveStreaming_1@91031/master.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="https://i.imgur.com/brxkNbw.png" group-title="Local",TV 16 Toronto (720p)
|
||||
http://capcobroadcaststream.in:1935/capco/tv29/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",TVO
|
||||
https://bozztv.com/teleyupp1/teleup-OMZsmYVUMp/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="French" tvg-logo="https://i.imgur.com/oRigj9q.jpg" group-title="",Télé Culturelle Médias (720p)
|
||||
https://5790d294af2dc.streamlock.net/8150/8150/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="Urdu" tvg-logo="https://i.imgur.com/7768lwn.jpg" group-title="Local",Urdu TV Toronto (720p)
|
||||
http://cdn4.live247stream.com/urdu/tv/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="Vietnamese" tvg-logo="https://i.imgur.com/IWpevBp.jpg" group-title="",VBS
|
||||
https://uni6rtmp.tulix.tv/vbstv/vbsabr.smil/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CBC Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-ydcl2V1MVC/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CTV Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-zxsJFt6VvY/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",TVO
|
||||
https://bozztv.com/teleyupp1/teleup-OMZsmYVUMp/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="CA" tvg-language="English" tvg-logo="" group-title="",CityTV Toronto
|
||||
https://bozztv.com/teleyupp1/teleup-iSykLSKMFr/playlist.m3u8
|
||||
|
|
|
@ -26,7 +26,7 @@ http://82.212.74.100:8000/live/hls/8951.m3u8
|
|||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="IQ" tvg-language="Arabic" tvg-logo="https://i.imgur.com/way7KwN.jpg" group-title="General",Assyrian ANB (720p)
|
||||
https://597f64b67707a.streamlock.net/anbsat.com/anb2/playlist.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="IQ" tvg-language="Arabic" tvg-logo="https://babylontv.net/wp-content/themes/babylontv/images/logo.png" group-title="General",Babylon TV
|
||||
https://iqlivestream.com/babylontv/babylonlivestream.m3u8
|
||||
https://iqlivestream.com/live/babylontv.flv
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="IQ" tvg-language="Arabic" tvg-logo="https://www.dijlah.tv/templates/default-2/live-page/images/logo-new1.png" group-title="News",Dijlah
|
||||
http://91.134.145.75:10001/Dijlah/tracks-v1a1/mono.m3u8
|
||||
#EXTINF:-1 tvg-id="" tvg-name="" tvg-country="IQ" tvg-language="Arabic" tvg-logo="https://www.dijlah.tv/templates/default-2/live-page/images/logo-new1.png" group-title="News",Dijlah (576p)
|
||||
|
|
|
@ -8,6 +8,7 @@ db.load = function () {
|
|||
const items = parser.parseIndex()
|
||||
for (const item of items) {
|
||||
const playlist = parser.parsePlaylist(item.url)
|
||||
db.playlists.add(playlist)
|
||||
for (const channel of playlist.channels) {
|
||||
db.channels.add(channel)
|
||||
|
||||
|
@ -166,4 +167,28 @@ db.categories = {
|
|||
}
|
||||
}
|
||||
|
||||
db.playlists = {
|
||||
list: [],
|
||||
add(playlist) {
|
||||
this.list.push(playlist)
|
||||
},
|
||||
all() {
|
||||
return this.list
|
||||
},
|
||||
only(list = []) {
|
||||
return this.list.filter(playlist => list.includes(playlist.name))
|
||||
},
|
||||
except(list = []) {
|
||||
return this.list.filter(playlist => !list.includes(playlist.name))
|
||||
},
|
||||
sortBy(fields) {
|
||||
this.list = utils.sortBy(this.list, fields)
|
||||
|
||||
return this
|
||||
},
|
||||
count() {
|
||||
return this.list.length
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = db
|
||||
|
|
|
@ -67,20 +67,19 @@ function generateCountryIndex() {
|
|||
const filename = `${ROOT_DIR}/index.country.m3u`
|
||||
utils.createFile(filename, '#EXTM3U\n')
|
||||
|
||||
const channels = db.channels.sortBy(['name', 'url']).forCountry({ code: null }).get()
|
||||
for (const channel of channels) {
|
||||
const unsorted = db.playlists.only(['unsorted'])[0]
|
||||
for (const channel of unsorted.channels) {
|
||||
const category = channel.category
|
||||
channel.category = ''
|
||||
utils.appendToFile(filename, channel.toString())
|
||||
channel.category = category
|
||||
}
|
||||
|
||||
const countries = db.countries.sortBy(['name']).all()
|
||||
for (const country of countries) {
|
||||
const channels = db.channels.sortBy(['name', 'url']).forCountry(country).get()
|
||||
for (const channel of channels) {
|
||||
const playlists = db.playlists.sortBy(['country']).except(['unsorted'])
|
||||
for (const playlist of playlists) {
|
||||
for (const channel of playlist.channels) {
|
||||
const category = channel.category
|
||||
channel.category = country.name
|
||||
channel.category = playlist.country
|
||||
utils.appendToFile(filename, channel.toString())
|
||||
channel.category = category
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ const playlistParser = require('iptv-playlist-parser')
|
|||
const epgParser = require('epg-parser')
|
||||
const utils = require('./utils')
|
||||
const categories = require('./categories')
|
||||
const path = require('path');
|
||||
|
||||
const parser = {}
|
||||
|
||||
|
@ -15,8 +16,10 @@ parser.parseIndex = function () {
|
|||
parser.parsePlaylist = function (filename) {
|
||||
const content = utils.readFile(filename)
|
||||
const result = playlistParser.parse(content)
|
||||
const name = path.parse(filename).name
|
||||
const country = utils.code2name(name)
|
||||
|
||||
return new Playlist({ header: result.header, items: result.items, url: filename })
|
||||
return new Playlist({ header: result.header, items: result.items, url: filename, country, name })
|
||||
}
|
||||
|
||||
parser.parseEPG = async function (url) {
|
||||
|
@ -32,8 +35,10 @@ parser.parseEPG = async function (url) {
|
|||
}
|
||||
|
||||
class Playlist {
|
||||
constructor({ header, items, url }) {
|
||||
constructor({ header, items, url, name, country }) {
|
||||
this.url = url
|
||||
this.name = name
|
||||
this.country = country
|
||||
this.header = header
|
||||
this.channels = items
|
||||
.map(item => new Channel({ data: item, header, sourceUrl: url }))
|
||||
|
|
Loading…
Reference in New Issue