diff --git a/scripts/core/playlist.js b/scripts/core/playlist.js index 76287be58..fdf57aec9 100644 --- a/scripts/core/playlist.js +++ b/scripts/core/playlist.js @@ -24,20 +24,20 @@ class Playlist { 'tvg-country': stream.get('tvg_country'), 'tvg-language': stream.get('tvg_language'), 'tvg-logo': stream.get('tvg_logo'), - 'user-agent': stream.get('http.user-agent') || undefined, - 'group-title': stream.get('group_title') + 'group-title': stream.get('group_title'), + 'user-agent': stream.get('user_agent') || undefined } } else { attrs = { 'tvg-id': stream.get('tvg_id'), status: stream.get('status'), - 'user-agent': stream.get('http.user-agent') || undefined + 'user-agent': stream.get('user_agent') || undefined } } const vlcOpts = { - 'http-referrer': stream.get('http.referrer') || undefined, - 'http-user-agent': stream.get('http.user-agent') || undefined + 'http-referrer': stream.get('http_referrer') || undefined, + 'http-user-agent': stream.get('user_agent') || undefined } this.links.push({ diff --git a/tests/__data__/expected/.api/streams.json b/tests/__data__/expected/.api/streams.json index 216a03eed..bf8b03b6b 100644 --- a/tests/__data__/expected/.api/streams.json +++ b/tests/__data__/expected/.api/streams.json @@ -1 +1 @@ -[{"channel":"AndorraTV.ad","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"BBCNews.uk","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"status":"blocked"},{"channel":"BBCNewsHD.ad","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1024,"height":576,"bitrate":0},{"channel":"KayhanTV.af","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"Sharq.af","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1280,"height":720,"bitrate":2226543}] \ No newline at end of file +[{"channel":"AndorraTV.ad","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","status":"error"},{"channel":"BBCNews.uk","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"status":"blocked"},{"channel":"BBCNewsHD.ad","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1024,"height":576,"bitrate":0},{"channel":"KayhanTV.af","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"LDPRTV.ru","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"error"},{"channel":"Sharq.af","url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","width":1280,"height":720,"bitrate":2226543}] \ No newline at end of file diff --git a/tests/__data__/expected/.gh-pages/categories/undefined.m3u b/tests/__data__/expected/.gh-pages/categories/undefined.m3u index 1433371ff..600720c52 100644 --- a/tests/__data__/expected/.gh-pages/categories/undefined.m3u +++ b/tests/__data__/expected/.gh-pages/categories/undefined.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="" tvg-country="IN" tvg-language="" tvg-logo="" group-title="Undefined",Daawah TV http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 diff --git a/tests/__data__/expected/.gh-pages/countries/uk.m3u b/tests/__data__/expected/.gh-pages/countries/uk.m3u index 0ee2e9d16..da3d43d77 100644 --- a/tests/__data__/expected/.gh-pages/countries/uk.m3u +++ b/tests/__data__/expected/.gh-pages/countries/uk.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/uk/ontvtonight.com.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="General;News",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.category.m3u b/tests/__data__/expected/.gh-pages/index.category.m3u index 62bbe7332..d9c5117f9 100644 --- a/tests/__data__/expected/.gh-pages/index.category.m3u +++ b/tests/__data__/expected/.gh-pages/index.category.m3u @@ -7,7 +7,9 @@ http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 #EXTINF:-1 tvg-id="MeteoMedia.ca" tvg-country="CA" tvg-language="French" tvg-logo="https://s1.twnmm.com/images/en_ca/mobile/logos/twn-mobile-logo.png" group-title="Weather",Meteomedia http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="" tvg-country="IN" tvg-language="" tvg-logo="" group-title="Undefined",Daawah TV http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.country.m3u b/tests/__data__/expected/.gh-pages/index.country.m3u index 3f8aa2213..651e2db9a 100644 --- a/tests/__data__/expected/.gh-pages/index.country.m3u +++ b/tests/__data__/expected/.gh-pages/index.country.m3u @@ -479,7 +479,9 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="United Arab Emirates",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="United Kingdom",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="United Kingdom" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="United Kingdom",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.language.m3u b/tests/__data__/expected/.gh-pages/index.language.m3u index b44a2c337..c7bdeda35 100644 --- a/tests/__data__/expected/.gh-pages/index.language.m3u +++ b/tests/__data__/expected/.gh-pages/index.language.m3u @@ -5,7 +5,9 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 #EXTINF:-1 tvg-id="LDPRTV.ru" tvg-country="RU" tvg-language="Russian" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Russian",ЛДПР ТВ (1080p) http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="" tvg-country="IN" tvg-language="" tvg-logo="" group-title="Undefined",Daawah TV http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.m3u b/tests/__data__/expected/.gh-pages/index.m3u index 766dcdcf2..7d6a9bb49 100644 --- a/tests/__data__/expected/.gh-pages/index.m3u +++ b/tests/__data__/expected/.gh-pages/index.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/ru/tv.yandex.ru.epg.xml,https://iptv-org.github.io/epg/guides/uk/ontvtonight.com.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="General;News",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.nsfw.m3u b/tests/__data__/expected/.gh-pages/index.nsfw.m3u index 1b0b59f7c..eb2260db9 100644 --- a/tests/__data__/expected/.gh-pages/index.nsfw.m3u +++ b/tests/__data__/expected/.gh-pages/index.nsfw.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/ru/tv.yandex.ru.epg.xml,https://iptv-org.github.io/epg/guides/uk/ontvtonight.com.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="General;News",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/.gh-pages/index.region.m3u b/tests/__data__/expected/.gh-pages/index.region.m3u index 2b79bec3d..8432281a7 100644 --- a/tests/__data__/expected/.gh-pages/index.region.m3u +++ b/tests/__data__/expected/.gh-pages/index.region.m3u @@ -9,13 +9,17 @@ http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8 http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 #EXTINF:-1 tvg-id="LDPRTV.ru" tvg-country="RU" tvg-language="Russian" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Commonwealth of Independent States",ЛДПР ТВ (1080p) http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Europe",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Europe" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="Zoo.ad" tvg-country="AD" tvg-language="" tvg-logo="" group-title="Europe",Zoo (720p) https://iptv-all.lanesh4d0w.repl.co/andorra/zoo #EXTINF:-1 tvg-id="LDPRTV.ru" tvg-country="RU" tvg-language="Russian" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Europe",ЛДПР ТВ (1080p) http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Europe, the Middle East and Africa",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Europe, the Middle East and Africa" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="Zoo.ad" tvg-country="AD" tvg-language="" tvg-logo="" group-title="Europe, the Middle East and Africa",Zoo (720p) https://iptv-all.lanesh4d0w.repl.co/andorra/zoo @@ -27,7 +31,9 @@ http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 #EXTINF:-1 tvg-id="" tvg-country="IN" tvg-language="" tvg-logo="" group-title="South Asia",Daawah TV http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Worldwide",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Worldwide" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Worldwide",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/.gh-pages/languages/undefined.m3u b/tests/__data__/expected/.gh-pages/languages/undefined.m3u index 1433371ff..600720c52 100644 --- a/tests/__data__/expected/.gh-pages/languages/undefined.m3u +++ b/tests/__data__/expected/.gh-pages/languages/undefined.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="" tvg-country="IN" tvg-language="" tvg-logo="" group-title="Undefined",Daawah TV http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.m3u8 diff --git a/tests/__data__/expected/.gh-pages/regions/emea.m3u b/tests/__data__/expected/.gh-pages/regions/emea.m3u index 4a22fcabe..251f7ef42 100644 --- a/tests/__data__/expected/.gh-pages/regions/emea.m3u +++ b/tests/__data__/expected/.gh-pages/regions/emea.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/ru/tv.yandex.ru.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="Zoo.ad" tvg-country="AD" tvg-language="" tvg-logo="" group-title="Undefined",Zoo (720p) https://iptv-all.lanesh4d0w.repl.co/andorra/zoo diff --git a/tests/__data__/expected/.gh-pages/regions/eur.m3u b/tests/__data__/expected/.gh-pages/regions/eur.m3u index 4a22fcabe..251f7ef42 100644 --- a/tests/__data__/expected/.gh-pages/regions/eur.m3u +++ b/tests/__data__/expected/.gh-pages/regions/eur.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/ru/tv.yandex.ru.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="Zoo.ad" tvg-country="AD" tvg-language="" tvg-logo="" group-title="Undefined",Zoo (720p) https://iptv-all.lanesh4d0w.repl.co/andorra/zoo diff --git a/tests/__data__/expected/.gh-pages/regions/int.m3u b/tests/__data__/expected/.gh-pages/regions/int.m3u index 58ae9fccb..f43ae1ce9 100644 --- a/tests/__data__/expected/.gh-pages/regions/int.m3u +++ b/tests/__data__/expected/.gh-pages/regions/int.m3u @@ -1,5 +1,7 @@ #EXTM3U x-tvg-url="https://iptv-org.github.io/epg/guides/ru/tv.yandex.ru.epg.xml,https://iptv-org.github.io/epg/guides/uk/ontvtonight.com.epg.xml" -#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined",Andorra TV (720p) [Not 24/7] +#EXTINF:-1 tvg-id="" tvg-country="UK" tvg-language="" tvg-logo="" group-title="Undefined" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",Andorra TV (720p) [Not 24/7] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8 #EXTINF:-1 tvg-id="BBCNews.uk" tvg-country="INT" tvg-language="English" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="General;News",BBC News HD http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 diff --git a/tests/__data__/expected/database/db_create.streams.db b/tests/__data__/expected/database/db_create.streams.db index 3eed2a5b7..03306c844 100644 --- a/tests/__data__/expected/database/db_create.streams.db +++ b/tests/__data__/expected/database/db_create.streams.db @@ -1,4 +1,4 @@ {"channel":null,"title":"1A Network (720p)","filepath":"tests/__data__/input/streams/unsorted.m3u","url":"https://simultv.s.llnwi.net/n4s4/2ANetwork/interlink.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"ZJejfvbOVTyuf6Gk"} {"channel":null,"title":"Fox Sports 2 Asia (Thai) (720p)","filepath":"tests/__data__/input/streams/us_blocked.m3u","url":"https://example.com/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"gnjGLZU1CEz79gcp"} -{"channel":"ATV.ad","title":"ATV (720p) [Offline]","filepath":"tests/__data__/input/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"9r9qmYRa2kxiirl0"} +{"channel":"ATV.ad","title":"ATV (720p) [Offline]","filepath":"tests/__data__/input/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","cluster_id":1,"_id":"9r9qmYRa2kxiirl0"} {"channel":null,"title":"ABC (720p)","filepath":"tests/__data__/input/streams/wrong_id.m3u","url":"https://example.com/playlist2.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"unOCFJtsDCbJupxR"} diff --git a/tests/__data__/expected/streams/ad.m3u b/tests/__data__/expected/streams/ad.m3u index 825c8e3b9..9c5d75dbe 100644 --- a/tests/__data__/expected/streams/ad.m3u +++ b/tests/__data__/expected/streams/ad.m3u @@ -1,3 +1,5 @@ #EXTM3U -#EXTINF:-1 tvg-id="AndorraTV.ad" status="timeout",ATV (720p) [Offline] +#EXTINF:-1 tvg-id="AndorraTV.ad" status="timeout" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",ATV (720p) [Offline] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 https://iptv-all.lanesh4d0w.repl.co/andorra/atv diff --git a/tests/__data__/input/database/db_export.streams.db b/tests/__data__/input/database/db_export.streams.db index 18f362471..0ba48c9e2 100644 --- a/tests/__data__/input/database/db_export.streams.db +++ b/tests/__data__/input/database/db_export.streams.db @@ -1,6 +1,6 @@ {"title":"ЛДПР ТВ","channel":"LDPRTV.ru","filepath":"tests/__data__/output/streams/ru.m3u","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"2ST8btby3mmsgPF0","status":"error"} {"title":"BBC News HD","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"3TbieV1ptnZVCIdn","status":"blocked"} -{"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"I6cjG2xCBRFFP4sz","status":"error"} +{"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","cluster_id":1,"_id":"I6cjG2xCBRFFP4sz","status":"error"} {"title":"BBC News HD","channel":"BBCNewsHD.ad","filepath":"tests/__data__/output/streams/uk.m3u","url":"https://master.starmena-cloud.com/hls/libyas.m3u8","http_referrer":null,"user_agent":null,"cluster_id":3,"_id":"WTbieV1ptnZVCIdn","status":"online","bitrate":0,"width":1024,"height":576} {"title":"Kayhan TV","channel":"KayhanTV.af","filepath":"channels/af.m3u","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"cFFpFVzSn6xFMUF3","status":"error"} {"title":"Sharq","channel":"Sharq.af","filepath":"channels/af.m3u","bitrate":2226543,"width":1280,"height":720,"url":"https://forerunnerrtmp.livestreamingcdn.com/output18/output18.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"cluster_id":1,"_id":"u7iyA6cjtf1iWWAZ","status":"online"} diff --git a/tests/__data__/input/database/playlist_generate.streams.db b/tests/__data__/input/database/playlist_generate.streams.db index c90b9ee7c..12e3519a6 100644 --- a/tests/__data__/input/database/playlist_generate.streams.db +++ b/tests/__data__/input/database/playlist_generate.streams.db @@ -2,7 +2,7 @@ {"title":"BBC News HD (720p) [Geo-blocked]","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/playlist.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"online","cluster_id":3,"_id":"3TbieV1ptnZVCId5"} {"title":"BBC News HD","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"online","cluster_id":3,"_id":"3TbieV1ptnZVCIdn"} {"title":"ATV","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"error","cluster_id":1,"_id":"I6cjG2xCBRFFP44z"} -{"title":"Andorra TV (720p) [Not 24/7]","channel":"","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"status":"online","cluster_id":3,"_id":"WTbieV1ptnZVCIdn"} +{"title":"Andorra TV (720p) [Not 24/7]","channel":"","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index2.m3u8","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","height":720,"width":1280,"status":"online","cluster_id":3,"_id":"WTbieV1ptnZVCIdn"} {"title":"Visit-X TV","channel":"VisitXTV.nl","filepath":"tests/__data__/output/streams/nl.m3u","url":"https://stream.visit-x.tv/vxtv/ngrp:live_all/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPF5"} {"title":"Tastemade","channel":"","filepath":"tests/__data__/output/streams/unsorted.m3u","url":"https://tastemade-freetv16min-plex.amagi.tv/hls/amagi_hls_data_tastemade-tastemadefreetv16-plex/CDN/playlist.m3u8","http_referrer":null,"user_agent":null,"status":"online","cluster_id":1,"_id":"2ST8btby3mmsgPAB"} {"title":"Supra","channel":"","filepath":"tests/__data__/output/streams/unsorted.m3u","url":"https://www.youtube.com/watch?v=dzShOMiH1FY","http_referrer":null,"user_agent":null,"status":"error","cluster_id":1,"_id":"2ST8btby3mmsg5AB"} diff --git a/tests/__data__/input/database/playlist_update.streams.db b/tests/__data__/input/database/playlist_update.streams.db index 3fa913e3c..735f03103 100644 --- a/tests/__data__/input/database/playlist_update.streams.db +++ b/tests/__data__/input/database/playlist_update.streams.db @@ -1,6 +1,6 @@ {"title":"ЛДПР ТВ (1080p)","channel":"LDPRTV.ru","filepath":"tests/__data__/output/streams/ru.m3u","url":"http://46.46.143.222:1935/live/mp4:ldpr.stream/playlist.m3u8","http_referrer":null,"user_agent":null,"height":1080,"width":1920,"cluster_id":1,"status":"online","_id":"2ST8btby3mmsgPF0"} {"title":"BBC News HD (720p) [Not 24/7]","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":3,"status":"error","_id":"3TbieV1ptnZVCIdn"} -{"title":"ATV (720p) [Offline]","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":1,"status":"timeout","_id":"I6cjG2xCBRFFP4sz"} +{"title":"ATV (720p) [Offline]","channel":"AndorraTV.ad","filepath":"tests/__data__/output/streams/ad.m3u","url":"https://iptv-all.lanesh4d0w.repl.co/andorra/atv","http_referrer":"http://imn.iq","user_agent":"Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148","height":720,"width":1280,"cluster_id":1,"status":"timeout","_id":"I6cjG2xCBRFFP4sz"} {"title":"BBC News HD (480p) [Geo-blocked]","channel":"BBCNews.uk","filepath":"tests/__data__/output/streams/uk.m3u","url":"http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/playlist.m3u8","http_referrer":null,"user_agent":null,"height":480,"width":640,"cluster_id":3,"status":"online","_id":"WTbieV1ptnZVCIdn"} {"title":"Kayhan TV","channel":"KayhanTV.af","filepath":"tests/__data__/output/streams/af.m3u","url":"http://208.93.117.113/live/Stream1/playlist.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":1,"status":"blocked","_id":"cFFpFVzSn6xFMUF3"} {"title":"Sharq","channel":"Sharq.af","filepath":"tests/__data__/output/streams/af.m3u","url":"http://51.210.199.50/hls/stream.m3u8","http_referrer":null,"user_agent":null,"height":720,"width":1280,"cluster_id":1,"status":"online","_id":"u7iyA6cjtf1iWWAZ"} diff --git a/tests/__data__/input/streams/ad.m3u b/tests/__data__/input/streams/ad.m3u index 52612ebde..cbefdebac 100644 --- a/tests/__data__/input/streams/ad.m3u +++ b/tests/__data__/input/streams/ad.m3u @@ -1,3 +1,5 @@ #EXTM3U -#EXTINF:-1 tvg-id="ATV.ad" tvg-country="AD" tvg-language="Catalan" tvg-logo="https://i.imgur.com/kJCjeQ4.png" group-title="General",ATV (720p) [Offline] +#EXTINF:-1 tvg-id="ATV.ad" tvg-country="AD" tvg-language="Catalan" tvg-logo="https://i.imgur.com/kJCjeQ4.png" group-title="General" user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148",ATV (720p) [Offline] +#EXTVLCOPT:http-referrer=http://imn.iq +#EXTVLCOPT:http-user-agent=Mozilla/5.0 (iPhone; CPU iPhone OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148 https://iptv-all.lanesh4d0w.repl.co/andorra/atv \ No newline at end of file diff --git a/tests/commands/playlist/update.test.js b/tests/commands/playlist/update.test.js index 65cd8d96b..d58374501 100644 --- a/tests/commands/playlist/update.test.js +++ b/tests/commands/playlist/update.test.js @@ -17,7 +17,7 @@ beforeEach(() => { it('can update playlists', () => { const files = glob - .sync('tests/__data__/expected/channels/*.m3u') + .sync('tests/__data__/expected/streams/*.m3u') .map(f => f.replace('tests/__data__/expected/', '')) files.forEach(filepath => {