diff --git a/.readme/_categories.md b/.readme/_categories.md
index f05e42ac6..1979aa05c 100644
--- a/.readme/_categories.md
+++ b/.readme/_categories.md
@@ -32,6 +32,6 @@
Travel | 8 | https://iptv-org.github.io/iptv/categories/travel.m3u |
Weather | 4 | https://iptv-org.github.io/iptv/categories/weather.m3u |
XXX | 70 | https://iptv-org.github.io/iptv/categories/xxx.m3u |
- Other | 2844 | https://iptv-org.github.io/iptv/categories/other.m3u |
+ Other | 2848 | https://iptv-org.github.io/iptv/categories/other.m3u |
\ No newline at end of file
diff --git a/.readme/_countries.md b/.readme/_countries.md
index b93a15a32..757b92e34 100644
--- a/.readme/_countries.md
+++ b/.readme/_countries.md
@@ -38,7 +38,7 @@
๐ง๐ฎ Burundi | 3 | https://iptv-org.github.io/iptv/countries/bi.m3u |
๐ฐ๐ญ Cambodia | 12 | https://iptv-org.github.io/iptv/countries/kh.m3u |
๐จ๐ฒ Cameroon | 8 | https://iptv-org.github.io/iptv/countries/cm.m3u |
- ๐จ๐ฆ Canada | 41 | https://iptv-org.github.io/iptv/countries/ca.m3u |
+ ๐จ๐ฆ Canada | 45 | https://iptv-org.github.io/iptv/countries/ca.m3u |
๐จ๐ป Cape Verde | 3 | https://iptv-org.github.io/iptv/countries/cv.m3u |
๐ฐ๐พ Cayman Islands | 1 | https://iptv-org.github.io/iptv/countries/ky.m3u |
๐จ๐ซ Central African Republic | 3 | https://iptv-org.github.io/iptv/countries/cf.m3u |
diff --git a/.readme/_languages.md b/.readme/_languages.md
index 205a5eb32..213b36108 100644
--- a/.readme/_languages.md
+++ b/.readme/_languages.md
@@ -20,7 +20,7 @@
Czech | 19 | https://iptv-org.github.io/iptv/languages/ces.m3u |
Danish | 12 | https://iptv-org.github.io/iptv/languages/dan.m3u |
Dutch | 67 | https://iptv-org.github.io/iptv/languages/nld.m3u |
- English | 735 | https://iptv-org.github.io/iptv/languages/eng.m3u |
+ English | 739 | https://iptv-org.github.io/iptv/languages/eng.m3u |
Estonian | 3 | https://iptv-org.github.io/iptv/languages/est.m3u |
Faroese | 1 | https://iptv-org.github.io/iptv/languages/fao.m3u |
Finnish | 3 | https://iptv-org.github.io/iptv/languages/fin.m3u |
diff --git a/README.md b/README.md
index 1a3c2636b..be607a60a 100644
--- a/README.md
+++ b/README.md
@@ -55,7 +55,7 @@ Or select one of the playlists from the list below.
Travel | 8 | https://iptv-org.github.io/iptv/categories/travel.m3u |
Weather | 4 | https://iptv-org.github.io/iptv/categories/weather.m3u |
XXX | 70 | https://iptv-org.github.io/iptv/categories/xxx.m3u |
- Other | 2844 | https://iptv-org.github.io/iptv/categories/other.m3u |
+ Other | 2848 | https://iptv-org.github.io/iptv/categories/other.m3u |
@@ -84,7 +84,7 @@ Or select one of the playlists from the list below.
Czech | 19 | https://iptv-org.github.io/iptv/languages/ces.m3u |
Danish | 12 | https://iptv-org.github.io/iptv/languages/dan.m3u |
Dutch | 67 | https://iptv-org.github.io/iptv/languages/nld.m3u |
- English | 735 | https://iptv-org.github.io/iptv/languages/eng.m3u |
+ English | 739 | https://iptv-org.github.io/iptv/languages/eng.m3u |
Estonian | 3 | https://iptv-org.github.io/iptv/languages/est.m3u |
Faroese | 1 | https://iptv-org.github.io/iptv/languages/fao.m3u |
Finnish | 3 | https://iptv-org.github.io/iptv/languages/fin.m3u |
@@ -194,7 +194,7 @@ Or select one of the playlists from the list below.
๐ง๐ฎ Burundi | 3 | https://iptv-org.github.io/iptv/countries/bi.m3u |
๐ฐ๐ญ Cambodia | 12 | https://iptv-org.github.io/iptv/countries/kh.m3u |
๐จ๐ฒ Cameroon | 8 | https://iptv-org.github.io/iptv/countries/cm.m3u |
- ๐จ๐ฆ Canada | 41 | https://iptv-org.github.io/iptv/countries/ca.m3u |
+ ๐จ๐ฆ Canada | 45 | https://iptv-org.github.io/iptv/countries/ca.m3u |
๐จ๐ป Cape Verde | 3 | https://iptv-org.github.io/iptv/countries/cv.m3u |
๐ฐ๐พ Cayman Islands | 1 | https://iptv-org.github.io/iptv/countries/ky.m3u |
๐จ๐ซ Central African Republic | 3 | https://iptv-org.github.io/iptv/countries/cf.m3u |
diff --git a/channels/ca.m3u b/channels/ca.m3u
index 90c57d4ab..5bedb6aa3 100644
--- a/channels/ca.m3u
+++ b/channels/ca.m3u
@@ -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
diff --git a/channels/iq.m3u b/channels/iq.m3u
index 4a76fbad8..09eff5bc3 100644
--- a/channels/iq.m3u
+++ b/channels/iq.m3u
@@ -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)
diff --git a/scripts/db.js b/scripts/db.js
index 77ad2eda3..91795217e 100644
--- a/scripts/db.js
+++ b/scripts/db.js
@@ -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
diff --git a/scripts/generate.js b/scripts/generate.js
index 6c6a0af26..369483ecd 100644
--- a/scripts/generate.js
+++ b/scripts/generate.js
@@ -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
}
diff --git a/scripts/parser.js b/scripts/parser.js
index ca43d90c4..9af768677 100644
--- a/scripts/parser.js
+++ b/scripts/parser.js
@@ -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 }))