diff --git a/.readme/template.md b/.readme/template.md index c7b26655ea..74e1549f92 100644 --- a/.readme/template.md +++ b/.readme/template.md @@ -50,7 +50,7 @@ Playlists in which channels are grouped by broadcast area. #### Countries ``` -https://iptv-org.github.io/iptv/index.countries.m3u +https://iptv-org.github.io/iptv/index.country.m3u ``` Same thing, but split up into separate files: @@ -60,12 +60,6 @@ Same thing, but split up into separate files: #### Regions -``` -https://iptv-org.github.io/iptv/index.regions.m3u -``` - -Same thing, but split up into separate files: - #include "./.readme/_regions.md" diff --git a/scripts/commands/playlist/generate.ts b/scripts/commands/playlist/generate.ts index 58677a59c7..6e960832a5 100644 --- a/scripts/commands/playlist/generate.ts +++ b/scripts/commands/playlist/generate.ts @@ -10,7 +10,6 @@ import { IndexLanguageGenerator, IndexCountryGenerator, SubdivisionsGenerator, - IndexRegionGenerator, CategoriesGenerator, CountriesGenerator, LanguagesGenerator, @@ -124,9 +123,6 @@ async function main() { logger.info('generating index.language.m3u...') await new IndexLanguageGenerator({ streams, logFile }).generate() - logger.info('generating index.region.m3u...') - await new IndexRegionGenerator({ streams, regions, logFile }).generate() - logger.info('saving generators.log...') const logStorage = new Storage(LOGS_DIR) logStorage.saveFile(logFile) diff --git a/scripts/generators/index.ts b/scripts/generators/index.ts index 7f09a6715b..66cf94eb4e 100644 --- a/scripts/generators/index.ts +++ b/scripts/generators/index.ts @@ -6,7 +6,6 @@ export * from './indexCountryGenerator' export * from './indexGenerator' export * from './indexLanguageGenerator' export * from './indexNsfwGenerator' -export * from './indexRegionGenerator' export * from './languagesGenerator' export * from './rawGenerator' export * from './regionsGenerator' diff --git a/scripts/generators/indexCountryGenerator.ts b/scripts/generators/indexCountryGenerator.ts index b476d828a8..016e86f731 100644 --- a/scripts/generators/indexCountryGenerator.ts +++ b/scripts/generators/indexCountryGenerator.ts @@ -26,13 +26,6 @@ export class IndexCountryGenerator implements Generator { .orderBy((stream: Stream) => stream.getTitle()) .filter((stream: Stream) => stream.isSFW()) .forEach((stream: Stream) => { - if (stream.isInternational()) { - const streamClone = stream.clone() - streamClone.groupTitle = 'International' - groupedStreams.add(streamClone) - return - } - if (!stream.hasBroadcastArea()) { const streamClone = stream.clone() streamClone.groupTitle = 'Undefined' @@ -45,6 +38,12 @@ export class IndexCountryGenerator implements Generator { streamClone.groupTitle = country.name groupedStreams.add(streamClone) }) + + if (stream.isInternational()) { + const streamClone = stream.clone() + streamClone.groupTitle = 'International' + groupedStreams.add(streamClone) + } }) groupedStreams = groupedStreams.orderBy((stream: Stream) => { diff --git a/scripts/generators/indexRegionGenerator.ts b/scripts/generators/indexRegionGenerator.ts deleted file mode 100644 index 27a9ae0fe5..0000000000 --- a/scripts/generators/indexRegionGenerator.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { Collection, Storage, File } from '@freearhey/core' -import { Stream, Playlist, Region } from '../models' -import { PUBLIC_DIR, EOL } from '../constants' -import { Generator } from './generator' - -type IndexRegionGeneratorProps = { - streams: Collection - regions: Collection - logFile: File -} - -export class IndexRegionGenerator implements Generator { - streams: Collection - regions: Collection - storage: Storage - logFile: File - - constructor({ streams, regions, logFile }: IndexRegionGeneratorProps) { - this.streams = streams.clone() - this.regions = regions - this.storage = new Storage(PUBLIC_DIR) - this.logFile = logFile - } - - async generate(): Promise { - let groupedStreams = new Collection() - this.streams - .orderBy((stream: Stream) => stream.getTitle()) - .filter((stream: Stream) => stream.isSFW()) - .forEach((stream: Stream) => { - if (!stream.hasBroadcastArea()) return - - stream.getBroadcastRegions().forEach((region: Region) => { - if (region.isWorldwide()) return - - const streamClone = stream.clone() - streamClone.groupTitle = region.name - groupedStreams.push(streamClone) - }) - }) - - groupedStreams = groupedStreams.orderBy((stream: Stream) => stream.groupTitle) - - const playlist = new Playlist(groupedStreams, { public: true }) - const filepath = 'index.region.m3u' - await this.storage.save(filepath, playlist.toString()) - this.logFile.append( - JSON.stringify({ type: 'index', filepath, count: playlist.streams.count() }) + EOL - ) - } -} diff --git a/scripts/generators/regionsGenerator.ts b/scripts/generators/regionsGenerator.ts index 60dab3d614..02112974ed 100644 --- a/scripts/generators/regionsGenerator.ts +++ b/scripts/generators/regionsGenerator.ts @@ -28,8 +28,6 @@ export class RegionsGenerator implements Generator { .filter((stream: Stream) => stream.isSFW()) this.regions.forEach(async (region: Region) => { - if (region.isWorldwide()) return - const regionStreams = streams.filter((stream: Stream) => stream.isBroadcastInRegion(region)) const playlist = new Playlist(regionStreams, { public: true }) diff --git a/scripts/models/broadcastArea.ts b/scripts/models/broadcastArea.ts index fa5b43f0e5..47b8a96c78 100644 --- a/scripts/models/broadcastArea.ts +++ b/scripts/models/broadcastArea.ts @@ -32,23 +32,27 @@ export class BroadcastArea { if (!city) return citiesIncluded.add(city) regionsIncluded = regionsIncluded.concat(city.getRegions()) + break } case 's': { const subdivision: Subdivision = subdivisionsKeyByCode.get(code) if (!subdivision) return subdivisionsIncluded.add(subdivision) regionsIncluded = regionsIncluded.concat(subdivision.getRegions()) + break } case 'c': { const country: Country = countriesKeyByCode.get(code) if (!country) return countriesIncluded.add(country) regionsIncluded = regionsIncluded.concat(country.getRegions()) + break } case 'r': { const region: Region = regionsKeyByCode.get(code) if (!region) return regionsIncluded = regionsIncluded.concat(region.getRegions()) + break } } }) diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/countries/int.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/countries/int.m3u index 4e507cf645..202cd4e3fa 100644 --- a/tests/__data__/expected/playlist_generate/.gh-pages/countries/int.m3u +++ b/tests/__data__/expected/playlist_generate/.gh-pages/countries/int.m3u @@ -3,5 +3,7 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 #EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Undefined",Duna World (576i) http://146.59.85.40:89/dunaworld/index.m3u8 +#EXTINF:-1 tvg-id="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 #EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="General",ЭлТР (480p) [Not 24/7] http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/index.country.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/index.country.m3u index 8cc0cf2622..01a9865193 100644 --- a/tests/__data__/expected/playlist_generate/.gh-pages/index.country.m3u +++ b/tests/__data__/expected/playlist_generate/.gh-pages/index.country.m3u @@ -7,6 +7,8 @@ http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 #EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="International",Duna World (576i) http://146.59.85.40:89/dunaworld/index.m3u8 +#EXTINF:-1 tvg-id="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="International",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 #EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="International",ЭлТР (480p) [Not 24/7] http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 #EXTINF:-1 tvg-id="" tvg-logo="" group-title="Undefined" http-referrer="http://imn.iq" 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",Andorra TV (720p) [Not 24/7] diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/index.region.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/index.region.m3u deleted file mode 100644 index d8d2d7f6e8..0000000000 --- a/tests/__data__/expected/playlist_generate/.gh-pages/index.region.m3u +++ /dev/null @@ -1,139 +0,0 @@ -#EXTM3U -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Africa",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Africa",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="5AABTV.ca" tvg-logo="" group-title="Americas",5AAB TV -http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Americas",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Americas",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="MeteoMedia.ca" tvg-logo="https://s1.twnmm.com/images/en_ca/mobile/logos/twn-mobile-logo.png" group-title="Americas",Meteomedia -http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Arab world",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Arab world",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Asia",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Asia",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Asia",ЛДПР ТВ (1080p) -http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 -#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="Asia",ЭлТР (480p) [Not 24/7] -http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Asia-Pacific",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Asia-Pacific",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Association of Southeast Asian Nations",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Association of Southeast Asian Nations",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Caribbean",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Caribbean",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Central America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Central America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Central Asia",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Central Asia",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="Central Asia",ЭлТР (480p) [Not 24/7] -http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Commonwealth of Independent States",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Commonwealth of Independent States",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="LDPRTV.ru" 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/blocked.m3u8 -#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="Commonwealth of Independent States",ЭлТР (480p) [Not 24/7] -http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 -#EXTINF:-1 tvg-id="AndorraTV.ad@SD" tvg-logo="https://i.imgur.com/BnhTn8i.png" group-title="Europe",ATV -https://iptv-all.lanesh4d0w.repl.co/andorra/atv -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Europe",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Europe",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Europe",ЛДПР ТВ (1080p) -http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 -#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="Europe",ЭлТР (480p) [Not 24/7] -http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 -#EXTINF:-1 tvg-id="AndorraTV.ad@SD" tvg-logo="https://i.imgur.com/BnhTn8i.png" group-title="Europe, the Middle East and Africa",ATV -https://iptv-all.lanesh4d0w.repl.co/andorra/atv -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Europe, the Middle East and Africa",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Europe, the Middle East and Africa",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="Europe, the Middle East and Africa",ЛДПР ТВ (1080p) -http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 -#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="Europe, the Middle East and Africa",ЭлТР (480p) [Not 24/7] -http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Hispanic America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Hispanic America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Latin America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Latin America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Latin America and the Caribbean",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Latin America and the Caribbean",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Maghreb",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Maghreb",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Middle East",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Middle East",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Middle East and North Africa",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Middle East and North Africa",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Nordics",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Nordics",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="5AABTV.ca" tvg-logo="" group-title="North America",5AAB TV -http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="North America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="North America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="MeteoMedia.ca" tvg-logo="https://s1.twnmm.com/images/en_ca/mobile/logos/twn-mobile-logo.png" group-title="North America",Meteomedia -http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 -#EXTINF:-1 tvg-id="5AABTV.ca" tvg-logo="" group-title="Northern America",5AAB TV -http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Northern America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Northern America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="MeteoMedia.ca" tvg-logo="https://s1.twnmm.com/images/en_ca/mobile/logos/twn-mobile-logo.png" group-title="Northern America",Meteomedia -http://encodercdn1.frontline.ca/encoder181/output/Meteo_Media_720p/playlist.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Oceania",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Oceania",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="South America",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="South America",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="South Asia",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="South Asia",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="Sub-Saharan Africa",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Sub-Saharan Africa",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 -#EXTINF:-1 tvg-id="BBCNews.uk" tvg-logo="https://raw.githubusercontent.com/Tapiosinn/tv-logos/master/countries/united-kingdom/bbc-news-uk.png" group-title="West Africa",BBC News HD -http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 -#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="West Africa",Duna World (576i) -http://146.59.85.40:89/dunaworld/index.m3u8 diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/regions/amer.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/regions/amer.m3u index 2151d32ae8..226aaf5de9 100644 --- a/tests/__data__/expected/playlist_generate/.gh-pages/regions/amer.m3u +++ b/tests/__data__/expected/playlist_generate/.gh-pages/regions/amer.m3u @@ -7,3 +7,5 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 http://146.59.85.40:89/dunaworld/index.m3u8 #EXTINF:-1 tvg-id="MeteoMedia.ca" 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="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/regions/nam.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/regions/nam.m3u index 2151d32ae8..226aaf5de9 100644 --- a/tests/__data__/expected/playlist_generate/.gh-pages/regions/nam.m3u +++ b/tests/__data__/expected/playlist_generate/.gh-pages/regions/nam.m3u @@ -7,3 +7,5 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 http://146.59.85.40:89/dunaworld/index.m3u8 #EXTINF:-1 tvg-id="MeteoMedia.ca" 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="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/regions/noram.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/regions/noram.m3u index 2151d32ae8..226aaf5de9 100644 --- a/tests/__data__/expected/playlist_generate/.gh-pages/regions/noram.m3u +++ b/tests/__data__/expected/playlist_generate/.gh-pages/regions/noram.m3u @@ -7,3 +7,5 @@ http://1111296894.rsc.cdn77.org/LS-ATL-54548-6/index.m3u8 http://146.59.85.40:89/dunaworld/index.m3u8 #EXTINF:-1 tvg-id="MeteoMedia.ca" 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="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 diff --git a/tests/__data__/expected/playlist_generate/.gh-pages/regions/ww.m3u b/tests/__data__/expected/playlist_generate/.gh-pages/regions/ww.m3u new file mode 100644 index 0000000000..edb9b671dc --- /dev/null +++ b/tests/__data__/expected/playlist_generate/.gh-pages/regions/ww.m3u @@ -0,0 +1,15 @@ +#EXTM3U +#EXTINF:-1 tvg-id="5AABTV.ca" tvg-logo="" group-title="Undefined",5AAB TV +http://158.69.124.9:1935/5aabtv/5aabtv/playlist.m3u8 +#EXTINF:-1 tvg-id="AndorraTV.ad@SD" tvg-logo="https://i.imgur.com/BnhTn8i.png" group-title="Undefined",ATV +https://iptv-all.lanesh4d0w.repl.co/andorra/atv +#EXTINF:-1 tvg-id="BBCNews.uk" 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 +#EXTINF:-1 tvg-id="DunaWorld.hu" tvg-logo="https://i.imgur.com/uOBQJZS.png" group-title="Undefined",Duna World (576i) +http://146.59.85.40:89/dunaworld/index.m3u8 +#EXTINF:-1 tvg-id="MeteoMedia.ca" 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="LDPRTV.ru" tvg-logo="https://iptvx.one/icn/ldpr-tv.png" group-title="General",ЛДПР ТВ (1080p) +http://46.46.143.222:1935/live/mp4:ldpr.stream/blocked.m3u8 +#EXTINF:-1 tvg-id="ElTR.kg" tvg-logo="https://i.ibb.co/r6czQwQ/365049798-774721644658455-5702658175909463406-n-2.png" group-title="General",ЭлТР (480p) [Not 24/7] +http://gohoski.fvds.ru:3000/mediabay/162/index.m3u8 diff --git a/tests/__data__/expected/playlist_generate/logs/generators.log b/tests/__data__/expected/playlist_generate/logs/generators.log index 6dc3d2af68..d5716ba246 100644 --- a/tests/__data__/expected/playlist_generate/logs/generators.log +++ b/tests/__data__/expected/playlist_generate/logs/generators.log @@ -5,70 +5,71 @@ {"type":"raw","filepath":"raw/uk.m3u","count":1} {"type":"raw","filepath":"raw/unsorted.m3u","count":4} {"type":"category","filepath":"categories/auto.m3u","count":0} -{"type":"category","filepath":"categories/animation.m3u","count":0} -{"type":"category","filepath":"categories/business.m3u","count":0} -{"type":"category","filepath":"categories/classic.m3u","count":0} -{"type":"category","filepath":"categories/cooking.m3u","count":0} -{"type":"category","filepath":"categories/culture.m3u","count":0} -{"type":"category","filepath":"categories/education.m3u","count":0} -{"type":"category","filepath":"categories/documentary.m3u","count":0} {"type":"category","filepath":"categories/comedy.m3u","count":0} -{"type":"category","filepath":"categories/family.m3u","count":0} -{"type":"category","filepath":"categories/kids.m3u","count":0} -{"type":"category","filepath":"categories/legislative.m3u","count":0} +{"type":"category","filepath":"categories/business.m3u","count":0} +{"type":"category","filepath":"categories/cooking.m3u","count":0} +{"type":"category","filepath":"categories/classic.m3u","count":0} +{"type":"category","filepath":"categories/animation.m3u","count":0} +{"type":"category","filepath":"categories/culture.m3u","count":0} {"type":"category","filepath":"categories/entertainment.m3u","count":0} -{"type":"category","filepath":"categories/music.m3u","count":0} -{"type":"category","filepath":"categories/outdoor.m3u","count":0} +{"type":"category","filepath":"categories/documentary.m3u","count":0} +{"type":"category","filepath":"categories/family.m3u","count":0} +{"type":"category","filepath":"categories/education.m3u","count":0} +{"type":"category","filepath":"categories/kids.m3u","count":0} +{"type":"category","filepath":"categories/movies.m3u","count":0} {"type":"category","filepath":"categories/general.m3u","count":3} {"type":"category","filepath":"categories/lifestyle.m3u","count":0} -{"type":"category","filepath":"categories/relax.m3u","count":0} -{"type":"category","filepath":"categories/religious.m3u","count":0} -{"type":"category","filepath":"categories/movies.m3u","count":0} -{"type":"category","filepath":"categories/shop.m3u","count":0} -{"type":"category","filepath":"categories/science.m3u","count":0} {"type":"category","filepath":"categories/news.m3u","count":1} +{"type":"category","filepath":"categories/legislative.m3u","count":0} +{"type":"category","filepath":"categories/music.m3u","count":0} +{"type":"category","filepath":"categories/relax.m3u","count":0} +{"type":"category","filepath":"categories/outdoor.m3u","count":0} +{"type":"category","filepath":"categories/religious.m3u","count":0} {"type":"category","filepath":"categories/series.m3u","count":0} -{"type":"category","filepath":"categories/sports.m3u","count":0} -{"type":"category","filepath":"categories/weather.m3u","count":1} +{"type":"category","filepath":"categories/science.m3u","count":0} {"type":"category","filepath":"categories/travel.m3u","count":0} +{"type":"category","filepath":"categories/weather.m3u","count":1} +{"type":"category","filepath":"categories/sports.m3u","count":0} {"type":"category","filepath":"categories/xxx.m3u","count":1} +{"type":"category","filepath":"categories/shop.m3u","count":0} {"type":"category","filepath":"categories/undefined.m3u","count":7} -{"type":"language","filepath":"languages/cat.m3u","count":1} -{"type":"language","filepath":"languages/eng.m3u","count":1} {"type":"language","filepath":"languages/rus.m3u","count":1} +{"type":"language","filepath":"languages/cat.m3u","count":1} {"type":"language","filepath":"languages/undefined.m3u","count":8} +{"type":"language","filepath":"languages/eng.m3u","count":1} {"type":"country","filepath":"countries/ca.m3u","count":1} -{"type":"country","filepath":"countries/int.m3u","count":3} +{"type":"country","filepath":"countries/int.m3u","count":4} {"type":"country","filepath":"countries/ru.m3u","count":1} {"type":"country","filepath":"countries/undefined.m3u","count":4} {"type":"subdivision","filepath":"subdivisions/ca-on.m3u","count":1} -{"type":"city","filepath":"cities/adcan.m3u","count":1} {"type":"region","filepath":"regions/afr.m3u","count":2} -{"type":"region","filepath":"regions/amer.m3u","count":4} -{"type":"region","filepath":"regions/apac.m3u","count":2} -{"type":"region","filepath":"regions/carib.m3u","count":2} +{"type":"city","filepath":"cities/adcan.m3u","count":1} {"type":"source","filepath":"sources/in.m3u","count":1} -{"type":"region","filepath":"regions/asean.m3u","count":2} {"type":"region","filepath":"regions/arab.m3u","count":2} -{"type":"region","filepath":"regions/asia.m3u","count":4} -{"type":"region","filepath":"regions/emea.m3u","count":5} -{"type":"region","filepath":"regions/cenamer.m3u","count":2} -{"type":"region","filepath":"regions/cis.m3u","count":4} +{"type":"region","filepath":"regions/asean.m3u","count":2} {"type":"region","filepath":"regions/cas.m3u","count":3} -{"type":"region","filepath":"regions/hispam.m3u","count":2} +{"type":"region","filepath":"regions/asia.m3u","count":4} +{"type":"region","filepath":"regions/apac.m3u","count":2} +{"type":"region","filepath":"regions/cis.m3u","count":4} +{"type":"region","filepath":"regions/cenamer.m3u","count":2} +{"type":"region","filepath":"regions/amer.m3u","count":5} +{"type":"region","filepath":"regions/carib.m3u","count":2} {"type":"region","filepath":"regions/maghreb.m3u","count":2} +{"type":"region","filepath":"regions/emea.m3u","count":5} {"type":"region","filepath":"regions/eur.m3u","count":5} +{"type":"region","filepath":"regions/ww.m3u","count":7} +{"type":"region","filepath":"regions/hispam.m3u","count":2} +{"type":"region","filepath":"regions/noram.m3u","count":5} {"type":"region","filepath":"regions/lac.m3u","count":2} -{"type":"region","filepath":"regions/mideast.m3u","count":2} -{"type":"region","filepath":"regions/noram.m3u","count":4} -{"type":"region","filepath":"regions/latam.m3u","count":2} -{"type":"region","filepath":"regions/oce.m3u","count":2} -{"type":"region","filepath":"regions/nam.m3u","count":4} -{"type":"region","filepath":"regions/southam.m3u","count":2} {"type":"region","filepath":"regions/mena.m3u","count":2} +{"type":"region","filepath":"regions/latam.m3u","count":2} +{"type":"region","filepath":"regions/mideast.m3u","count":2} +{"type":"region","filepath":"regions/nam.m3u","count":5} +{"type":"region","filepath":"regions/sas.m3u","count":2} +{"type":"region","filepath":"regions/oce.m3u","count":2} +{"type":"region","filepath":"regions/southam.m3u","count":2} {"type":"region","filepath":"regions/wafr.m3u","count":2} {"type":"region","filepath":"regions/nord.m3u","count":2} -{"type":"region","filepath":"regions/sas.m3u","count":2} {"type":"region","filepath":"regions/ssa.m3u","count":2} {"type":"source","filepath":"sources/unsorted.m3u","count":4} {"type":"source","filepath":"sources/ca.m3u","count":2} @@ -77,6 +78,5 @@ {"type":"source","filepath":"sources/kg.m3u","count":1} {"type":"index","filepath":"index.m3u","count":11} {"type":"index","filepath":"index.category.m3u","count":12} -{"type":"index","filepath":"index.country.m3u","count":9} +{"type":"index","filepath":"index.country.m3u","count":10} {"type":"index","filepath":"index.language.m3u","count":11} -{"type":"index","filepath":"index.region.m3u","count":69} diff --git a/tests/__data__/expected/readme_update/playlists.md b/tests/__data__/expected/readme_update/playlists.md index 120e27f2af..f643ae9b83 100644 --- a/tests/__data__/expected/readme_update/playlists.md +++ b/tests/__data__/expected/readme_update/playlists.md @@ -96,7 +96,7 @@ Playlists in which channels are grouped by broadcast area. #### Countries ``` -https://iptv-org.github.io/iptv/index.countries.m3u +https://iptv-org.github.io/iptv/index.country.m3u ``` Same thing, but split up into separate files: @@ -124,12 +124,6 @@ Same thing, but split up into separate files: #### Regions -``` -https://iptv-org.github.io/iptv/index.regions.m3u -``` - -Same thing, but split up into separate files: - - Africa https://iptv-org.github.io/iptv/regions/afr.m3u - Americas https://iptv-org.github.io/iptv/regions/amer.m3u diff --git a/tests/__data__/input/data/feeds.json b/tests/__data__/input/data/feeds.json index 1c2ce8806c..1e28c47404 100644 --- a/tests/__data__/input/data/feeds.json +++ b/tests/__data__/input/data/feeds.json @@ -116,7 +116,8 @@ "name": "SD", "is_main": true, "broadcast_area": [ - "c/RU" + "c/RU", + "r/NAM" ], "languages": [ "rus"