diff --git a/.readme/_categories.md b/.readme/_categories.md
index a9d408715e..b6f50eeb8e 100644
--- a/.readme/_categories.md
+++ b/.readme/_categories.md
@@ -17,19 +17,19 @@
Health | 2 | https://iptv-org.github.io/iptv/categories/health.m3u |
History | 3 | https://iptv-org.github.io/iptv/categories/history.m3u |
Hobby | 11 | https://iptv-org.github.io/iptv/categories/hobby.m3u |
- Kids | 96 | https://iptv-org.github.io/iptv/categories/kids.m3u |
+ Kids | 95 | https://iptv-org.github.io/iptv/categories/kids.m3u |
Legislative | 27 | https://iptv-org.github.io/iptv/categories/legislative.m3u |
Lifestyle | 8 | https://iptv-org.github.io/iptv/categories/lifestyle.m3u |
- Local | 288 | https://iptv-org.github.io/iptv/categories/local.m3u |
- Movies | 101 | https://iptv-org.github.io/iptv/categories/movies.m3u |
- Music | 216 | https://iptv-org.github.io/iptv/categories/music.m3u |
- News | 299 | https://iptv-org.github.io/iptv/categories/news.m3u |
- Religious | 198 | https://iptv-org.github.io/iptv/categories/religious.m3u |
- Shop | 32 | https://iptv-org.github.io/iptv/categories/shop.m3u |
- Sport | 165 | https://iptv-org.github.io/iptv/categories/sport.m3u |
+ Local | 291 | https://iptv-org.github.io/iptv/categories/local.m3u |
+ Movies | 100 | https://iptv-org.github.io/iptv/categories/movies.m3u |
+ Music | 215 | https://iptv-org.github.io/iptv/categories/music.m3u |
+ News | 291 | https://iptv-org.github.io/iptv/categories/news.m3u |
+ Religious | 199 | https://iptv-org.github.io/iptv/categories/religious.m3u |
+ Shop | 36 | https://iptv-org.github.io/iptv/categories/shop.m3u |
+ Sport | 162 | https://iptv-org.github.io/iptv/categories/sport.m3u |
Travel | 9 | https://iptv-org.github.io/iptv/categories/travel.m3u |
Weather | 7 | https://iptv-org.github.io/iptv/categories/weather.m3u |
XXX | 47 | https://iptv-org.github.io/iptv/categories/xxx.m3u |
- Other | 3991 | https://iptv-org.github.io/iptv/categories/other.m3u |
+ Other | 3975 | 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 b3d414aa8b..3d87bc1f31 100644
--- a/.readme/_countries.md
+++ b/.readme/_countries.md
@@ -22,7 +22,7 @@
Belgium | 29 | https://iptv-org.github.io/iptv/countries/be.m3u | http://195.154.221.171/epg/guidebelgium.xml.gz |
Bolivia | 13 | https://iptv-org.github.io/iptv/countries/bo.m3u | |
Bosnia and Herzegovina | 3 | https://iptv-org.github.io/iptv/countries/ba.m3u | http://epg.streamstv.me/epg/guide-exyu.xml.gz |
- Brazil | 144 | https://iptv-org.github.io/iptv/countries/br.m3u | http://infinitytv.xyz/guide.xml |
+ Brazil | 144 | https://iptv-org.github.io/iptv/countries/br.m3u | |
Brunei | 3 | https://iptv-org.github.io/iptv/countries/bn.m3u | |
Bulgaria | 20 | https://iptv-org.github.io/iptv/countries/bg.m3u | http://195.154.221.171/epg/guidebulgaria.xml.gz |
Burkina Faso | 1 | https://iptv-org.github.io/iptv/countries/bf.m3u | |
@@ -74,7 +74,7 @@
Italy | 171 | https://iptv-org.github.io/iptv/countries/it.m3u | http://195.154.221.171/epg/guideitaly.xml.gz |
Ivory Coast | 3 | https://iptv-org.github.io/iptv/countries/ci.m3u | |
Jamaica | 5 | https://iptv-org.github.io/iptv/countries/jm.m3u | |
- Japan | 31 | https://iptv-org.github.io/iptv/countries/jp.m3u | |
+ Japan | 16 | https://iptv-org.github.io/iptv/countries/jp.m3u | |
Jordan | 10 | https://iptv-org.github.io/iptv/countries/jo.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Kazakhstan | 26 | https://iptv-org.github.io/iptv/countries/kz.m3u | https://iptvx.one/epg/epg.xml.gz |
Kenya | 5 | https://iptv-org.github.io/iptv/countries/ke.m3u | |
@@ -83,7 +83,7 @@
Kyrgyzstan | 8 | https://iptv-org.github.io/iptv/countries/kg.m3u | |
Laos | 4 | https://iptv-org.github.io/iptv/countries/la.m3u | |
Latvia | 5 | https://iptv-org.github.io/iptv/countries/lv.m3u | https://iptvx.one/epg/epg.xml.gz |
- Lebanon | 39 | https://iptv-org.github.io/iptv/countries/lb.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Lebanon | 36 | https://iptv-org.github.io/iptv/countries/lb.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Libya | 7 | https://iptv-org.github.io/iptv/countries/ly.m3u | |
Liechtenstein | 2 | https://iptv-org.github.io/iptv/countries/li.m3u | |
Lithuania | 1 | https://iptv-org.github.io/iptv/countries/lt.m3u | https://iptvx.one/epg/epg.xml.gz |
@@ -122,7 +122,7 @@
Rwanda | 5 | https://iptv-org.github.io/iptv/countries/rw.m3u | |
Saint Kitts and Nevis | 3 | https://iptv-org.github.io/iptv/countries/kn.m3u | |
San Marino | 1 | https://iptv-org.github.io/iptv/countries/sm.m3u | |
- Saudi Arabia | 39 | https://iptv-org.github.io/iptv/countries/sa.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Saudi Arabia | 40 | https://iptv-org.github.io/iptv/countries/sa.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Senegal | 8 | https://iptv-org.github.io/iptv/countries/sn.m3u | |
Serbia | 9 | https://iptv-org.github.io/iptv/countries/rs.m3u | http://epg.streamstv.me/epg/guide-exyu.xml.gz |
Sierra Leone | 1 | https://iptv-org.github.io/iptv/countries/sl.m3u | |
@@ -138,7 +138,7 @@
Sudan | 9 | https://iptv-org.github.io/iptv/countries/sd.m3u | |
Sweden | 13 | https://iptv-org.github.io/iptv/countries/se.m3u | http://195.154.221.171/epg/guidesweden.xml.gz |
Switzerland | 23 | https://iptv-org.github.io/iptv/countries/ch.m3u | http://195.154.221.171/epg/guideswitzerland.xml.gz |
- Syria | 29 | https://iptv-org.github.io/iptv/countries/sy.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Syria | 24 | https://iptv-org.github.io/iptv/countries/sy.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Taiwan | 92 | https://iptv-org.github.io/iptv/countries/tw.m3u | |
Tajikistan | 1 | https://iptv-org.github.io/iptv/countries/tj.m3u | |
Tanzania | 1 | https://iptv-org.github.io/iptv/countries/tz.m3u | |
@@ -149,7 +149,7 @@
Turkmenistan | 11 | https://iptv-org.github.io/iptv/countries/tm.m3u | |
Uganda | 2 | https://iptv-org.github.io/iptv/countries/ug.m3u | |
Ukraine | 173 | https://iptv-org.github.io/iptv/countries/ua.m3u | https://iptvx.one/epg/epg.xml.gz |
- United Arab Emirates | 117 | https://iptv-org.github.io/iptv/countries/ae.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ United Arab Emirates | 116 | https://iptv-org.github.io/iptv/countries/ae.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
United Kingdom | 42 | https://iptv-org.github.io/iptv/countries/uk.m3u | http://195.154.221.171/epg/guideuk.xml.gz |
United States | 465 | https://iptv-org.github.io/iptv/countries/us.m3u | http://epg.streamstv.me/epg/guide-usa.xml.gz |
Uruguay | 5 | https://iptv-org.github.io/iptv/countries/uy.m3u | |
@@ -157,7 +157,7 @@
Vietnam | 71 | https://iptv-org.github.io/iptv/countries/vn.m3u | |
Virgin Islands of the United States | 1 | https://iptv-org.github.io/iptv/countries/vi.m3u | |
Western Sahara | 1 | https://iptv-org.github.io/iptv/countries/eh.m3u | |
- Yemen | 8 | https://iptv-org.github.io/iptv/countries/ye.m3u | |
+ Yemen | 9 | https://iptv-org.github.io/iptv/countries/ye.m3u | |
Zimbabwe | 2 | https://iptv-org.github.io/iptv/countries/zw.m3u | |
\ No newline at end of file
diff --git a/.readme/_languages.md b/.readme/_languages.md
index bc699ea09d..f348fd9c8a 100644
--- a/.readme/_languages.md
+++ b/.readme/_languages.md
@@ -6,7 +6,7 @@
Akan | 2 | https://iptv-org.github.io/iptv/languages/aka.m3u |
Albanian | 34 | https://iptv-org.github.io/iptv/languages/sqi.m3u |
Amharic | 2 | https://iptv-org.github.io/iptv/languages/amh.m3u |
- Arabic | 459 | https://iptv-org.github.io/iptv/languages/ara.m3u |
+ Arabic | 454 | https://iptv-org.github.io/iptv/languages/ara.m3u |
Armenian | 9 | https://iptv-org.github.io/iptv/languages/hye.m3u |
Azerbaijani | 13 | https://iptv-org.github.io/iptv/languages/aze.m3u |
Bengali | 7 | https://iptv-org.github.io/iptv/languages/ben.m3u |
@@ -19,7 +19,7 @@
Czech | 29 | https://iptv-org.github.io/iptv/languages/ces.m3u |
Danish | 14 | https://iptv-org.github.io/iptv/languages/dan.m3u |
Dutch | 75 | https://iptv-org.github.io/iptv/languages/nld.m3u |
- English | 695 | https://iptv-org.github.io/iptv/languages/eng.m3u |
+ English | 696 | https://iptv-org.github.io/iptv/languages/eng.m3u |
Estonian | 3 | https://iptv-org.github.io/iptv/languages/est.m3u |
Faroese | 2 | https://iptv-org.github.io/iptv/languages/fao.m3u |
Finnish | 3 | https://iptv-org.github.io/iptv/languages/fin.m3u |
@@ -33,7 +33,7 @@
Icelandic | 5 | https://iptv-org.github.io/iptv/languages/isl.m3u |
Indonesian | 97 | https://iptv-org.github.io/iptv/languages/ind.m3u |
Italian | 171 | https://iptv-org.github.io/iptv/languages/ita.m3u |
- Japanese | 31 | https://iptv-org.github.io/iptv/languages/jpn.m3u |
+ Japanese | 16 | https://iptv-org.github.io/iptv/languages/jpn.m3u |
Javanese | 3 | https://iptv-org.github.io/iptv/languages/jav.m3u |
Kazakh | 22 | https://iptv-org.github.io/iptv/languages/kaz.m3u |
Khmer | 25 | https://iptv-org.github.io/iptv/languages/khm.m3u |
@@ -70,6 +70,6 @@
Urdu | 29 | https://iptv-org.github.io/iptv/languages/urd.m3u |
Vietnamese | 71 | https://iptv-org.github.io/iptv/languages/vie.m3u |
Yue Chinese | 14 | https://iptv-org.github.io/iptv/languages/yue.m3u |
- Undefined | 178 | https://iptv-org.github.io/iptv/languages/undefined.m3u |
+ Undefined | 175 | https://iptv-org.github.io/iptv/languages/undefined.m3u |
\ No newline at end of file
diff --git a/README.md b/README.md
index a711a2beb0..9e54e86591 100644
--- a/README.md
+++ b/README.md
@@ -39,20 +39,20 @@ Or select one of the playlists from the list below.
Health | 2 | https://iptv-org.github.io/iptv/categories/health.m3u |
History | 3 | https://iptv-org.github.io/iptv/categories/history.m3u |
Hobby | 11 | https://iptv-org.github.io/iptv/categories/hobby.m3u |
- Kids | 96 | https://iptv-org.github.io/iptv/categories/kids.m3u |
+ Kids | 95 | https://iptv-org.github.io/iptv/categories/kids.m3u |
Legislative | 27 | https://iptv-org.github.io/iptv/categories/legislative.m3u |
Lifestyle | 8 | https://iptv-org.github.io/iptv/categories/lifestyle.m3u |
- Local | 288 | https://iptv-org.github.io/iptv/categories/local.m3u |
- Movies | 101 | https://iptv-org.github.io/iptv/categories/movies.m3u |
- Music | 216 | https://iptv-org.github.io/iptv/categories/music.m3u |
- News | 299 | https://iptv-org.github.io/iptv/categories/news.m3u |
- Religious | 198 | https://iptv-org.github.io/iptv/categories/religious.m3u |
- Shop | 32 | https://iptv-org.github.io/iptv/categories/shop.m3u |
- Sport | 165 | https://iptv-org.github.io/iptv/categories/sport.m3u |
+ Local | 291 | https://iptv-org.github.io/iptv/categories/local.m3u |
+ Movies | 100 | https://iptv-org.github.io/iptv/categories/movies.m3u |
+ Music | 215 | https://iptv-org.github.io/iptv/categories/music.m3u |
+ News | 291 | https://iptv-org.github.io/iptv/categories/news.m3u |
+ Religious | 199 | https://iptv-org.github.io/iptv/categories/religious.m3u |
+ Shop | 36 | https://iptv-org.github.io/iptv/categories/shop.m3u |
+ Sport | 162 | https://iptv-org.github.io/iptv/categories/sport.m3u |
Travel | 9 | https://iptv-org.github.io/iptv/categories/travel.m3u |
Weather | 7 | https://iptv-org.github.io/iptv/categories/weather.m3u |
XXX | 47 | https://iptv-org.github.io/iptv/categories/xxx.m3u |
- Other | 3991 | https://iptv-org.github.io/iptv/categories/other.m3u |
+ Other | 3975 | https://iptv-org.github.io/iptv/categories/other.m3u |
@@ -66,7 +66,7 @@ Or select one of the playlists from the list below.
Akan | 2 | https://iptv-org.github.io/iptv/languages/aka.m3u |
Albanian | 34 | https://iptv-org.github.io/iptv/languages/sqi.m3u |
Amharic | 2 | https://iptv-org.github.io/iptv/languages/amh.m3u |
- Arabic | 459 | https://iptv-org.github.io/iptv/languages/ara.m3u |
+ Arabic | 454 | https://iptv-org.github.io/iptv/languages/ara.m3u |
Armenian | 9 | https://iptv-org.github.io/iptv/languages/hye.m3u |
Azerbaijani | 13 | https://iptv-org.github.io/iptv/languages/aze.m3u |
Bengali | 7 | https://iptv-org.github.io/iptv/languages/ben.m3u |
@@ -79,7 +79,7 @@ Or select one of the playlists from the list below.
Czech | 29 | https://iptv-org.github.io/iptv/languages/ces.m3u |
Danish | 14 | https://iptv-org.github.io/iptv/languages/dan.m3u |
Dutch | 75 | https://iptv-org.github.io/iptv/languages/nld.m3u |
- English | 695 | https://iptv-org.github.io/iptv/languages/eng.m3u |
+ English | 696 | https://iptv-org.github.io/iptv/languages/eng.m3u |
Estonian | 3 | https://iptv-org.github.io/iptv/languages/est.m3u |
Faroese | 2 | https://iptv-org.github.io/iptv/languages/fao.m3u |
Finnish | 3 | https://iptv-org.github.io/iptv/languages/fin.m3u |
@@ -93,7 +93,7 @@ Or select one of the playlists from the list below.
Icelandic | 5 | https://iptv-org.github.io/iptv/languages/isl.m3u |
Indonesian | 97 | https://iptv-org.github.io/iptv/languages/ind.m3u |
Italian | 171 | https://iptv-org.github.io/iptv/languages/ita.m3u |
- Japanese | 31 | https://iptv-org.github.io/iptv/languages/jpn.m3u |
+ Japanese | 16 | https://iptv-org.github.io/iptv/languages/jpn.m3u |
Javanese | 3 | https://iptv-org.github.io/iptv/languages/jav.m3u |
Kazakh | 22 | https://iptv-org.github.io/iptv/languages/kaz.m3u |
Khmer | 25 | https://iptv-org.github.io/iptv/languages/khm.m3u |
@@ -130,7 +130,7 @@ Or select one of the playlists from the list below.
Urdu | 29 | https://iptv-org.github.io/iptv/languages/urd.m3u |
Vietnamese | 71 | https://iptv-org.github.io/iptv/languages/vie.m3u |
Yue Chinese | 14 | https://iptv-org.github.io/iptv/languages/yue.m3u |
- Undefined | 178 | https://iptv-org.github.io/iptv/languages/undefined.m3u |
+ Undefined | 175 | https://iptv-org.github.io/iptv/languages/undefined.m3u |
@@ -160,7 +160,7 @@ Or select one of the playlists from the list below.
Belgium | 29 | https://iptv-org.github.io/iptv/countries/be.m3u | http://195.154.221.171/epg/guidebelgium.xml.gz |
Bolivia | 13 | https://iptv-org.github.io/iptv/countries/bo.m3u | |
Bosnia and Herzegovina | 3 | https://iptv-org.github.io/iptv/countries/ba.m3u | http://epg.streamstv.me/epg/guide-exyu.xml.gz |
- Brazil | 144 | https://iptv-org.github.io/iptv/countries/br.m3u | http://infinitytv.xyz/guide.xml |
+ Brazil | 144 | https://iptv-org.github.io/iptv/countries/br.m3u | |
Brunei | 3 | https://iptv-org.github.io/iptv/countries/bn.m3u | |
Bulgaria | 20 | https://iptv-org.github.io/iptv/countries/bg.m3u | http://195.154.221.171/epg/guidebulgaria.xml.gz |
Burkina Faso | 1 | https://iptv-org.github.io/iptv/countries/bf.m3u | |
@@ -212,7 +212,7 @@ Or select one of the playlists from the list below.
Italy | 171 | https://iptv-org.github.io/iptv/countries/it.m3u | http://195.154.221.171/epg/guideitaly.xml.gz |
Ivory Coast | 3 | https://iptv-org.github.io/iptv/countries/ci.m3u | |
Jamaica | 5 | https://iptv-org.github.io/iptv/countries/jm.m3u | |
- Japan | 31 | https://iptv-org.github.io/iptv/countries/jp.m3u | |
+ Japan | 16 | https://iptv-org.github.io/iptv/countries/jp.m3u | |
Jordan | 10 | https://iptv-org.github.io/iptv/countries/jo.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Kazakhstan | 26 | https://iptv-org.github.io/iptv/countries/kz.m3u | https://iptvx.one/epg/epg.xml.gz |
Kenya | 5 | https://iptv-org.github.io/iptv/countries/ke.m3u | |
@@ -221,7 +221,7 @@ Or select one of the playlists from the list below.
Kyrgyzstan | 8 | https://iptv-org.github.io/iptv/countries/kg.m3u | |
Laos | 4 | https://iptv-org.github.io/iptv/countries/la.m3u | |
Latvia | 5 | https://iptv-org.github.io/iptv/countries/lv.m3u | https://iptvx.one/epg/epg.xml.gz |
- Lebanon | 39 | https://iptv-org.github.io/iptv/countries/lb.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Lebanon | 36 | https://iptv-org.github.io/iptv/countries/lb.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Libya | 7 | https://iptv-org.github.io/iptv/countries/ly.m3u | |
Liechtenstein | 2 | https://iptv-org.github.io/iptv/countries/li.m3u | |
Lithuania | 1 | https://iptv-org.github.io/iptv/countries/lt.m3u | https://iptvx.one/epg/epg.xml.gz |
@@ -260,7 +260,7 @@ Or select one of the playlists from the list below.
Rwanda | 5 | https://iptv-org.github.io/iptv/countries/rw.m3u | |
Saint Kitts and Nevis | 3 | https://iptv-org.github.io/iptv/countries/kn.m3u | |
San Marino | 1 | https://iptv-org.github.io/iptv/countries/sm.m3u | |
- Saudi Arabia | 39 | https://iptv-org.github.io/iptv/countries/sa.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Saudi Arabia | 40 | https://iptv-org.github.io/iptv/countries/sa.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Senegal | 8 | https://iptv-org.github.io/iptv/countries/sn.m3u | |
Serbia | 9 | https://iptv-org.github.io/iptv/countries/rs.m3u | http://epg.streamstv.me/epg/guide-exyu.xml.gz |
Sierra Leone | 1 | https://iptv-org.github.io/iptv/countries/sl.m3u | |
@@ -276,7 +276,7 @@ Or select one of the playlists from the list below.
Sudan | 9 | https://iptv-org.github.io/iptv/countries/sd.m3u | |
Sweden | 13 | https://iptv-org.github.io/iptv/countries/se.m3u | http://195.154.221.171/epg/guidesweden.xml.gz |
Switzerland | 23 | https://iptv-org.github.io/iptv/countries/ch.m3u | http://195.154.221.171/epg/guideswitzerland.xml.gz |
- Syria | 29 | https://iptv-org.github.io/iptv/countries/sy.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ Syria | 24 | https://iptv-org.github.io/iptv/countries/sy.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
Taiwan | 92 | https://iptv-org.github.io/iptv/countries/tw.m3u | |
Tajikistan | 1 | https://iptv-org.github.io/iptv/countries/tj.m3u | |
Tanzania | 1 | https://iptv-org.github.io/iptv/countries/tz.m3u | |
@@ -287,7 +287,7 @@ Or select one of the playlists from the list below.
Turkmenistan | 11 | https://iptv-org.github.io/iptv/countries/tm.m3u | |
Uganda | 2 | https://iptv-org.github.io/iptv/countries/ug.m3u | |
Ukraine | 173 | https://iptv-org.github.io/iptv/countries/ua.m3u | https://iptvx.one/epg/epg.xml.gz |
- United Arab Emirates | 117 | https://iptv-org.github.io/iptv/countries/ae.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
+ United Arab Emirates | 116 | https://iptv-org.github.io/iptv/countries/ae.m3u | http://195.154.221.171/epg/guidearab.xml.gz |
United Kingdom | 42 | https://iptv-org.github.io/iptv/countries/uk.m3u | http://195.154.221.171/epg/guideuk.xml.gz |
United States | 465 | https://iptv-org.github.io/iptv/countries/us.m3u | http://epg.streamstv.me/epg/guide-usa.xml.gz |
Uruguay | 5 | https://iptv-org.github.io/iptv/countries/uy.m3u | |
@@ -295,7 +295,7 @@ Or select one of the playlists from the list below.
Vietnam | 71 | https://iptv-org.github.io/iptv/countries/vn.m3u | |
Virgin Islands of the United States | 1 | https://iptv-org.github.io/iptv/countries/vi.m3u | |
Western Sahara | 1 | https://iptv-org.github.io/iptv/countries/eh.m3u | |
- Yemen | 8 | https://iptv-org.github.io/iptv/countries/ye.m3u | |
+ Yemen | 9 | https://iptv-org.github.io/iptv/countries/ye.m3u | |
Zimbabwe | 2 | https://iptv-org.github.io/iptv/countries/zw.m3u | |
diff --git a/channels/af.m3u b/channels/af.m3u
index a88a9e914b..f8f12a756d 100644
--- a/channels/af.m3u
+++ b/channels/af.m3u
@@ -9,6 +9,8 @@ https://d10rltuy0iweup.cloudfront.net/ATNNAT/myStream/chunklist_w2121902183.m3u8
http://1-fss27-s0.streamhoster.com/lv_kabultv/_definst_/kabultvus/chunklist.m3u8
#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Pushto" tvg-logo="https://i.imgur.com/XpR1VvZ.png" group-title="",Kayhan TV
http://playout395.livestreamingcdn.com:1935/live/Stream1/playlist.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Pushto" tvg-logo="https://i.imgur.com/XkLlmcf.jpg" group-title="",Shamshad TV
+https://54627d4fc5996.streamlock.net/shamshadtelevision/shamshadtelevision/chunklist.m3u8
#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Pushto" tvg-logo="https://i.imgur.com/JerfIBt.jpg" group-title="",Tuti
https://rrsatrtmp.tulix.tv/livecdn827/myStream.sdp/chunklist.m3u8
#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Pushto" tvg-logo="https://i.imgur.com/SZWyE76.jpg" group-title="",Wesalhaq TV
diff --git a/channels/jp.m3u b/channels/jp.m3u
index 6f615346d5..463eec2a8b 100644
--- a/channels/jp.m3u
+++ b/channels/jp.m3u
@@ -1,63 +1,33 @@
#EXTM3U
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://static.iptv-epg.com/gb/BBCNews.uk.png" group-title="News",BBC News Japan
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/s6f0LgS.jpg" group-title="News",BBC News Japan
https://bbc1.media.ylive.jp/53ccb8ca9cb44762b3f1f4aecc85b7ba/ap-northeast-1/5690807595001/profile_0/chunklist.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/rXrSsiI.jpg" group-title="",CGNTV 日本
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/rXrSsiI.jpg" group-title="Religious",CGNTV Japan
http://cgntv-glive.ofsdelivery.net/live/_definst_/cgntv_jp/playlist.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/8AM9fC8.jpg" group-title="",GSTV
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/8AM9fC8.jpg" group-title="Shop",GSTV
https://gemstv.wide-stream.net/gemstv01/smil:gemstv01.smil/chunklist.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/I5SCsNe.jpg" group-title="Sport",Jsports 1
-https://cdn.jp.jpnettv.live/jptv/jsports1/chunklist_w1427590049.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/aHtZvLS.jpg" group-title="Sport",Jsports 2
-https://cdn.jp.jpnettv.live/jptv/jsports2/chunklist_w1010892267.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/IQ5jhAA.jpg" group-title="Sport",Jsports 3
-https://cdn.jp.jpnettv.live/jptv/jsports3/chunklist_w1897420437.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/DZfq881.jpg" group-title="Sport",Jsports 4
-https://cdn.jp.jpnettv.live/jptv/jsports4/chunklist_w1773357951.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan
-http://210.210.155.35/uq2663/h/h23/index.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 1m
-https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp/index_1M.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 1mb
-https://b-nhkwlive-xjp.akamaized.net/hls/live/2003458-b/nhkwlive-xjp/index_1M.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 200k
-https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp/index_200k.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 200kb
-https://b-nhkwlive-xjp.akamaized.net/hls/live/2003458-b/nhkwlive-xjp/index_200k.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 600k
-https://nhkwlive-xjp.akamaized.net/hls/live/2003458/nhkwlive-xjp/index_600k.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan 600kb
-https://b-nhkwlive-xjp.akamaized.net/hls/live/2003458-b/nhkwlive-xjp/index_600k.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan live
-https://nhkworld.webcdn.stream.ne.jp/www11/nhkworld-tv/global/2003458/live.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Chinese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK 华语视界
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/8/87/Gtv_logo_ja_01.svg/800px-Gtv_logo_ja_01.svg.png" group-title="Local",Gunma TV
+https://movie.mcas.jp/switcher/smil:mcas8.smil/master.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://img.japanet.co.jp/shopping/img/senqua/header/logo.gif" group-title="Shop",Japanet Channel DX
+https://bcsecurelivehls-i.akamaihd.net/hls/live/265320/5043843989001/140130JTDX/index.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="English" tvg-logo="https://upload.wikimedia.org/wikipedia/en/thumb/1/1c/New_Japan_Pro_Wrestling_Logo_2.svg/480px-New_Japan_Pro_Wrestling_Logo_2.svg.png" group-title="Sport",New Japan Pro Wrestling World
+https://aka-amd-njpwworld-hls-enlive.akamaized.net/hls/video/njpw_en/njpw_en_channel01_3/chunklist_DVR.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Chinese" tvg-logo="https://i.imgur.com/4yRulEZ.png" group-title="News",NHK Chinese Vision
https://nhkw-zh-hlscomp.akamaized.net/8thz5iufork8wjip/playlist.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/oWKCBIz.png" group-title="News",NHK Kishou-Saigai NHK Kishou-Saigai (Weather and Disaster Prevention)
+https://nhknewsreal5-i.akamaihd.net/hls/live/267603/nhknewsreal5/playlist.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/SQISXoD.jpg" group-title="News",NHK World Japan
+https://nhkworld.webcdn.stream.ne.jp/www11/nhkworld-tv/global/2003458/live.m3u8
#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/Ya4yHpC.jpg" group-title="News",NTV News24
-http://n24-cdn-live-b.ntv.co.jp/ch01/High.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/Ya4yHpC.jpg" group-title="News",NTV News24
-http://n24-cdn-live.ntv.co.jp/ch01/High.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/Ya4yHpC.jpg" group-title="News",NTV News24
-http://n24-cdn-live.ntv.co.jp/ch01/Low.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/Ya4yHpC.jpg" group-title="News",NTV News24
-http://www.news24.jp/livestream/index.m3u8
+https://www.news24.jp/livestream/index.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/9u9TaMA.png" group-title="Shop",QVC Japan
+https://cdn-live1.qvc.jp/iPhone/1501/1501.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/3K36JEA.jpg" group-title="Shop",Shop Channel
+https://stream3.shopch.jp/HLS/master.m3u8
#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://static.iptv-epg.com/jp/TBSNews.jp.png" group-title="News",TBS News
https://tbs1.media.ylive.jp/d6d710ed2c204b4cb9ffea55a16a5f40/ap-northeast-1/5690807595001/playlist.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/XoDOeDW.png" group-title="",Tokyo - Narita Airport
-http://movie.mcas.jp/mcas/gm2_2/chunklist.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/tYZz5CC.png" group-title="Weather",WeatherNews
-http://movie.mcas.jp/mcas/smil:wn1.smil/chunklist_b1800000.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="" tvg-logo="https://m3u-editor.com/storage/channel-logos/07cd9d90-3cc5-11ea-9aa8-0b5bd3ba261d/92700/14042785.jpg" group-title="Movies",Wowow Cinema
-http://192.240.127.34:1935/live/cs27.stream/playlist.m3u8?wowzasessionid=1300220279
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/9VXxnlo.png" group-title="",ウェザーニュース
-http://movie.mcas.jp/mcas/wn1_2/master.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://img.japanet.co.jp/shopping/img/senqua/header/logo.gif" group-title="",ジャパネットチャンネルDX
-http://bcsecurelivehls-i.akamaihd.net/hls/live/265320/5043843989001/140130JTDX/index_1200.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/9u9TaMA.png" group-title="",日本QVC Japan
-http://cdn-live1.qvc.jp/iPhone/800/800.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/3K36JEA.jpg" group-title="",日本购物1
-http://stream1.shopch.jp/HLS/out1/prog_index.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/3K36JEA.jpg" group-title="",日本购物2
-http://stream1.shopch.jp/HLS/out2/prog_index.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/3K36JEA.jpg" group-title="",日本购物3
-http://stream1.shopch.jp/HLS/out3/prog_index.m3u8
-#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://i.imgur.com/3K36JEA.jpg" group-title="",日本购物4
-http://stream1.shopch.jp/HLS/out4/prog_index.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Tokyo_metropolitan_television_logo_%28rainbow%29.svg/800px-Tokyo_metropolitan_television_logo_%28rainbow%29.svg.png" group-title="Local",Tokyo MX1
+https://movie.mcas.jp/mcas/smil:mx1_prod.smil/master.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://upload.wikimedia.org/wikipedia/commons/thumb/6/6f/Tokyo_metropolitan_television_logo_%28rainbow%29.svg/800px-Tokyo_metropolitan_television_logo_%28rainbow%29.svg.png" group-title="Local",Tokyo MX2
+https://movie.mcas.jp/mcas/smil:mx2_prod.smil/master.m3u8
+#EXTINF:-1 tvg-id="" tvg-name="" tvg-language="Japanese" tvg-logo="https://dbbovgtu2bg0x.cloudfront.net/uploads/program/main_image/749853303/app_app_wether_news.png" group-title="Weather",Weather News
+http://movie.mcas.jp/mcas/smil:wn1.smil/master.m3u8
diff --git a/scripts/format.js b/scripts/format.js
index ea804fb08e..70d963cd8d 100644
--- a/scripts/format.js
+++ b/scripts/format.js
@@ -4,7 +4,7 @@ const config = {
debug: process.env.npm_config_debug || false,
country: process.env.npm_config_country,
exclude: process.env.npm_config_exclude,
- epg: process.env.npm_config_epg || false,
+ epg: process.env.npm_config_epg || false
}
let updated = 0
@@ -75,7 +75,7 @@ function parseIndex() {
function parsePlaylist(url) {
const playlist = helper.parsePlaylist(url)
- playlist.items = playlist.items.map((item) => {
+ playlist.items = playlist.items.map(item => {
return helper.createChannel(item)
})
@@ -84,7 +84,7 @@ function parsePlaylist(url) {
function sortChannels(playlist) {
const channels = JSON.stringify(playlist.items)
- playlist.items = helper.sortBy(playlist.items, ['title', 'url'])
+ playlist.items = helper.sortBy(playlist.items, ['name', 'url'])
if (channels !== JSON.stringify(playlist.items)) {
playlist.changed = true
}
@@ -95,14 +95,14 @@ function sortChannels(playlist) {
function removeDuplicates(playlist) {
let buffer = {}
const channels = JSON.stringify(playlist.items)
- playlist.items = playlist.items.filter((i) => {
+ playlist.items = playlist.items.filter(i => {
let result = typeof buffer[i.url] === 'undefined'
if (result) {
buffer[i.url] = true
} else {
if (config.debug) {
- console.log(`Duplicate of '${i.title}' has been removed`)
+ console.log(`Duplicate of '${i.name}' has been removed`)
}
}
@@ -128,34 +128,34 @@ async function loadEPG(url) {
function addDataFromEPG(playlist, epg) {
if (!epg) return playlist
- for (let item of playlist.items) {
- if (!item.id) continue
+ for (let channel of playlist.items) {
+ if (!channel.tvg.id) continue
- const channel = epg.channels[item.id]
+ const epgItem = epg.channels[channel.tvg.id]
- if (!channel) continue
+ if (!epgItem) continue
- if (!item.name && channel.name.length) {
- item.name = channel.name[0].value
+ if (!channel.tvg.name && epgItem.name.length) {
+ channel.tvg.name = epgItem.name[0].value
playlist.changed = true
if (config.debug) {
- console.log(`Added tvg-name '${item.name}' to '${item.title}'`)
+ console.log(`Added tvg-name '${channel.tvg.name}' to '${channel.name}'`)
}
}
- if (!item.language && channel.name.length && channel.name[0].lang) {
- item.language = channel.name[0].lang
+ if (!channel.language.length && epgItem.name.length && epgItem.name[0].lang) {
+ channel.setLanguage(epgItem.name[0].lang)
playlist.changed = true
if (config.debug) {
- console.log(`Added tvg-language '${item.language}' to '${item.title}'`)
+ console.log(`Added tvg-language '${epgItem.name[0].lang}' to '${channel.name}'`)
}
}
- if (!item.logo && channel.icon.length) {
- item.logo = channel.icon[0]
+ if (!channel.logo && epgItem.icon.length) {
+ channel.logo = epgItem.icon[0]
playlist.changed = true
if (config.debug) {
- console.log(`Added tvg-logo '${item.logo}' to '${item.title}'`)
+ console.log(`Added tvg-logo '${channel.logo}' to '${channel.name}'`)
}
}
}
@@ -173,10 +173,10 @@ function updatePlaylist(filepath, playlist) {
}
function filterUnsorted() {
- const urls = items.map((i) => i.url)
+ const urls = items.map(i => i.url)
const unsortedPlaylist = parsePlaylist('channels/unsorted.m3u')
const before = unsortedPlaylist.items.length
- unsortedPlaylist.items = unsortedPlaylist.items.filter((i) => !urls.includes(i.url))
+ unsortedPlaylist.items = unsortedPlaylist.items.filter(i => !urls.includes(i.url))
if (before !== unsortedPlaylist.items.length) {
updatePlaylist('channels/unsorted.m3u', unsortedPlaylist)
diff --git a/scripts/generate.js b/scripts/generate.js
index 9fd5e11511..bb8655bcc4 100644
--- a/scripts/generate.js
+++ b/scripts/generate.js
@@ -18,6 +18,8 @@ function main() {
createNoJekyllFile()
console.log('Generating index.m3u...')
generateIndex()
+ console.log('Generating channels.json...')
+ generateChannels()
console.log('Generating index.country.m3u...')
generateCountryIndex()
console.log('Generating index.language.m3u...')
@@ -61,9 +63,9 @@ function parseIndex() {
for (let item of playlist.items) {
const channel = helper.createChannel(item)
- channel.countryCode = countryCode
- channel.countryName = countryName
- channel.epg = playlist.header.attrs['x-tvg-url'] || ''
+ channel.country.code = countryCode
+ channel.country.name = countryName
+ channel.tvg.url = playlist.header.attrs['x-tvg-url'] || ''
// all
list.all.push(channel)
@@ -75,16 +77,24 @@ function parseIndex() {
countries[countryCode].push(channel)
// language
- for (let language of channel.language.split(';')) {
- const languageCode = helper.getISO6391Code(language) || 'undefined'
+ if (!channel.language.length) {
+ const languageCode = 'undefined'
if (!languages[languageCode]) {
languages[languageCode] = []
}
languages[languageCode].push(channel)
+ } else {
+ for (let language of channel.language) {
+ const languageCode = language.code || 'undefined'
+ if (!languages[languageCode]) {
+ languages[languageCode] = []
+ }
+ languages[languageCode].push(channel)
+ }
}
// category
- const categoryCode = channel.group.toLowerCase() || 'other'
+ const categoryCode = channel.category ? channel.category.toLowerCase() : 'other'
if (!categories[categoryCode]) {
categories[categoryCode] = []
}
@@ -101,22 +111,29 @@ function generateIndex() {
const filename = `${ROOT_DIR}/index.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(list.all, ['title', 'url'])
+ const channels = helper.sortBy(list.all, ['name', 'url'])
for (let channel of channels) {
helper.appendToFile(filename, channel.toString())
}
}
+function generateChannels() {
+ const filename = `${ROOT_DIR}/channels.json`
+ const sorted = helper.sortBy(list.all, ['name', 'url'])
+ const channels = sorted.map(c => c.toJSON())
+ helper.createFile(filename, JSON.stringify(channels, null, '\t'))
+}
+
function generateCountryIndex() {
const filename = `${ROOT_DIR}/index.country.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(list.all, ['countryName', 'title', 'url'])
+ const channels = helper.sortBy(list.all, ['country.name', 'name', 'url'])
for (let channel of channels) {
- const group = channel.group
- channel.group = channel.countryName
+ const category = channel.category
+ channel.category = channel.country.name
helper.appendToFile(filename, channel.toString())
- channel.group = group
+ channel.category = category
}
}
@@ -124,12 +141,12 @@ function generateLanguageIndex() {
const filename = `${ROOT_DIR}/index.language.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(list.all, ['language', 'title', 'url'])
+ const channels = helper.sortBy(list.all, ['language.name', 'name', 'url'])
for (let channel of channels) {
- const group = channel.group
- channel.group = channel.language
+ const category = channel.category
+ channel.category = channel.language.map(l => l.name).join(';')
helper.appendToFile(filename, channel.toString())
- channel.group = group
+ channel.category = category
}
}
@@ -137,7 +154,7 @@ function generateCategoryIndex() {
const filename = `${ROOT_DIR}/index.category.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(list.all, ['group', 'title', 'url'])
+ const channels = helper.sortBy(list.all, ['category', 'name', 'url'])
for (let channel of channels) {
helper.appendToFile(filename, channel.toString())
}
@@ -152,7 +169,7 @@ function generateCountries() {
const filename = `${outputDir}/${cid}.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(Object.values(country), ['title', 'url'])
+ const channels = helper.sortBy(Object.values(country), ['name', 'url'])
for (let channel of channels) {
helper.appendToFile(filename, channel.toString())
}
@@ -168,7 +185,7 @@ function generateCategories() {
const filename = `${outputDir}/${cid}.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(Object.values(category), ['title', 'url'])
+ const channels = helper.sortBy(Object.values(category), ['name', 'url'])
for (let channel of channels) {
helper.appendToFile(filename, channel.toString())
}
@@ -184,7 +201,7 @@ function generateLanguages() {
const filename = `${outputDir}/${lid}.m3u`
helper.createFile(filename, '#EXTM3U\n')
- const channels = helper.sortBy(Object.values(language), ['title', 'url'])
+ const channels = helper.sortBy(Object.values(language), ['name', 'url'])
for (let channel of channels) {
helper.appendToFile(filename, channel.toString())
}
diff --git a/scripts/helper.js b/scripts/helper.js
index bf5cbd4980..7d7791bb07 100644
--- a/scripts/helper.js
+++ b/scripts/helper.js
@@ -15,10 +15,13 @@ let helper = {}
helper.sortBy = function (arr, fields) {
return arr.sort((a, b) => {
for (let field of fields) {
- if (a[field].toLowerCase() < b[field].toLowerCase()) {
+ let propA = a[field] ? a[field].toLowerCase() : ''
+ let propB = b[field] ? b[field].toLowerCase() : ''
+
+ if (propA < propB) {
return -1
}
- if (a[field].toLowerCase() > b[field].toLowerCase()) {
+ if (propA > propB) {
return 1
}
}
@@ -41,13 +44,13 @@ helper.escapeStringRegexp = function (scring) {
}
helper.getISO6391Name = function (code) {
- const lang = iso6393.find((l) => l.iso6393 === code.toLowerCase())
+ const lang = iso6393.find(l => l.iso6393 === code.toLowerCase())
return lang && lang.name ? lang.name : null
}
helper.getISO6391Code = function (name) {
- const lang = iso6393.find((l) => l.name === name)
+ const lang = iso6393.find(l => l.name === name)
return lang && lang.iso6393 ? lang.iso6393 : null
}
@@ -69,7 +72,7 @@ helper.parseEPG = async function (url) {
return Promise.resolve({
url,
- channels,
+ channels
})
}
@@ -80,9 +83,9 @@ helper.getEPG = function (url) {
method: 'get',
url: url,
responseType: 'stream',
- timeout: 60000,
+ timeout: 60000
})
- .then((res) => {
+ .then(res => {
let stream
if (/\.gz$/i.test(url)) {
let gunzip = zlib.createGunzip()
@@ -103,7 +106,7 @@ helper.getEPG = function (url) {
reject(e)
})
})
- .catch((e) => {
+ .catch(e => {
reject(e)
})
})
@@ -179,7 +182,7 @@ helper.parseMessage = function (err, u) {
if (msgArr.length === 0) return
- const line = msgArr.find((line) => {
+ const line = msgArr.find(line => {
return line.indexOf(u) === 0
})
@@ -190,20 +193,65 @@ helper.parseMessage = function (err, u) {
helper.filterPlaylists = function (arr, include = '', exclude = '') {
if (include) {
- const included = include.split(',').map((filename) => `channels/${filename}.m3u`)
+ const included = include.split(',').map(filename => `channels/${filename}.m3u`)
- return arr.filter((i) => included.indexOf(i.url) > -1)
+ return arr.filter(i => included.indexOf(i.url) > -1)
}
if (exclude) {
- const excluded = exclude.split(',').map((filename) => `channels/${filename}.m3u`)
+ const excluded = exclude.split(',').map(filename => `channels/${filename}.m3u`)
- return arr.filter((i) => excluded.indexOf(i.url) === -1)
+ return arr.filter(i => excluded.indexOf(i.url) === -1)
}
return arr
}
+helper.filterGroup = function (groupTitle) {
+ if (!groupTitle) return ''
+
+ const supportedCategories = [
+ 'Auto',
+ 'Business',
+ 'Classic',
+ 'Comedy',
+ 'Documentary',
+ 'Education',
+ 'Entertainment',
+ 'Family',
+ 'Fashion',
+ 'Food',
+ 'General',
+ 'Health',
+ 'History',
+ 'Hobby',
+ 'Kids',
+ 'Legislative',
+ 'Lifestyle',
+ 'Local',
+ 'Movies',
+ 'Music',
+ 'News',
+ 'Quiz',
+ 'Religious',
+ 'Sci-Fi',
+ 'Shop',
+ 'Sport',
+ 'Travel',
+ 'Weather',
+ 'XXX'
+ ]
+ const groupIndex = supportedCategories.map(g => g.toLowerCase()).indexOf(groupTitle.toLowerCase())
+
+ if (groupIndex === -1) {
+ groupTitle = ''
+ } else {
+ groupTitle = supportedCategories[groupIndex]
+ }
+
+ return groupTitle
+}
+
class Playlist {
constructor(data) {
this.header = data.header
@@ -226,97 +274,96 @@ class Playlist {
class Channel {
constructor(data) {
- this.id = data.tvg.id
- this.name = data.tvg.name
- this.language = data.tvg.language
- .split(';')
- .filter((l) => !!helper.getISO6391Code(l))
- .join(';')
- this.logo = data.tvg.logo
- this.group = this._filterGroup(data.group.title)
- this.url = data.url
- this.title = data.name.trim()
- this.userAgent = data.http['user-agent']
- this.referrer = data.http['referrer']
+ this.parseData(data)
}
- _filterGroup(groupTitle) {
- if (!groupTitle) return ''
-
- const supportedCategories = [
- 'Auto',
- 'Business',
- 'Classic',
- 'Comedy',
- 'Documentary',
- 'Education',
- 'Entertainment',
- 'Family',
- 'Fashion',
- 'Food',
- 'General',
- 'Health',
- 'History',
- 'Hobby',
- 'Kids',
- 'Legislative',
- 'Lifestyle',
- 'Local',
- 'Movies',
- 'Music',
- 'News',
- 'Quiz',
- 'Religious',
- 'Sci-Fi',
- 'Shop',
- 'Sport',
- 'Travel',
- 'Weather',
- 'XXX',
- ]
- const groupIndex = supportedCategories
- .map((g) => g.toLowerCase())
- .indexOf(groupTitle.toLowerCase())
-
- if (groupIndex === -1) {
- groupTitle = ''
- } else {
- groupTitle = supportedCategories[groupIndex]
+ parseData(data) {
+ this.logo = data.tvg.logo
+ this.category = helper.filterGroup(data.group.title)
+ this.url = data.url
+ this.name = data.name.trim()
+ this.http = data.http
+ this.tvg = data.tvg
+ this.country = {
+ code: null,
+ name: null
}
- return groupTitle
+ this.setLanguage(data.tvg.language)
+ }
+
+ get ['language.name']() {
+ return this.language[0] ? this.language[0].name : null
+ }
+
+ get ['country.name']() {
+ return this.country.name || null
+ }
+
+ setLanguage(lang) {
+ this.language = lang
+ .split(';')
+ .map(name => {
+ const code = name ? helper.getISO6391Code(name) : null
+ if (!code) return null
+
+ return {
+ code,
+ name
+ }
+ })
+ .filter(l => l)
}
toString() {
- const country = this.countryCode.toUpperCase()
- const epg = this.id && this.epg ? this.epg : ''
+ const country = this.country.code ? this.country.code.toUpperCase() : ''
+ const tvgUrl = (this.tvg.id || this.tvg.name) && this.tvg.url ? this.tvg.url : ''
+ const language = this.language.map(l => l.name).join(';')
- let info = `-1 tvg-id="${this.id}" tvg-name="${this.name}" tvg-language="${this.language}" tvg-logo="${this.logo}" tvg-country="${country}" tvg-url="${epg}" group-title="${this.group}",${this.title}`
+ let info = `-1 tvg-id="${this.tvg.id}" tvg-name="${this.tvg.name}" tvg-language="${language}" tvg-logo="${this.logo}" tvg-country="${country}" tvg-url="${tvgUrl}" group-title="${this.category}",${this.name}`
- if (this.referrer) {
- info += `\n#EXTVLCOPT:http-referrer=${this.referrer}`
+ if (this.http['referrer']) {
+ info += `\n#EXTVLCOPT:http-referrer=${this.http['referrer']}`
}
- if (this.userAgent) {
- info += `\n#EXTVLCOPT:http-user-agent=${this.userAgent}`
+ if (this.http['user-agent']) {
+ info += `\n#EXTVLCOPT:http-user-agent=${this.http['user-agent']}`
}
return '#EXTINF:' + info + '\n' + this.url + '\n'
}
toShortString() {
- let info = `-1 tvg-id="${this.id}" tvg-name="${this.name}" tvg-language="${this.language}" tvg-logo="${this.logo}" group-title="${this.group}",${this.title}`
+ const language = this.language.map(l => l.name).join(';')
- if (this.referrer) {
- info += `\n#EXTVLCOPT:http-referrer=${this.referrer}`
+ let info = `-1 tvg-id="${this.tvg.id}" tvg-name="${this.tvg.name}" tvg-language="${language}" tvg-logo="${this.logo}" group-title="${this.category}",${this.name}`
+
+ if (this.http['referrer']) {
+ info += `\n#EXTVLCOPT:http-referrer=${this.http['referrer']}`
}
- if (this.userAgent) {
- info += `\n#EXTVLCOPT:http-user-agent=${this.userAgent}`
+ if (this.http['user-agent']) {
+ info += `\n#EXTVLCOPT:http-user-agent=${this.http['user-agent']}`
}
return '#EXTINF:' + info + '\n' + this.url + '\n'
}
+
+ toJSON() {
+ return {
+ name: this.name,
+ logo: this.logo || null,
+ url: this.url,
+ category: this.category || null,
+ language: this.language,
+ country: this.country,
+ tvg: {
+ id: this.tvg.id || null,
+ name: this.tvg.name || null,
+ url: this.tvg.url || null
+ }
+ }
+ }
}
module.exports = helper