diff --git a/scripts/commands/readme/update.js b/scripts/commands/readme/update.js
index b197c5f9b7..003a60b89f 100644
--- a/scripts/commands/readme/update.js
+++ b/scripts/commands/readme/update.js
@@ -47,15 +47,27 @@ async function createCountryTable() {
logger.info('creating country table...')
const rows = []
await api.countries.load()
+ await api.subdivisions.load()
const items = await parser.parseLogs(`${LOGS_DIR}/countries.log`)
for (const item of items) {
const code = file.getFilename(item.filepath)
const country = await api.countries.find({ code: code.toUpperCase() })
- rows.push({
- name: country ? `${country.flag} ${country.name}` : 'Undefined',
- channels: item.count,
- playlist: `https://iptv-org.github.io/iptv/${item.filepath}
`
- })
+ if (country) {
+ rows.push({
+ name: `${country.flag} ${country.name}`,
+ channels: item.count,
+ playlist: `https://iptv-org.github.io/iptv/${item.filepath}
`
+ })
+ } else {
+ const subdivision = await api.subdivisions.find({ code: code.toUpperCase() })
+ if (subdivision) {
+ rows.push({
+ name: ` ${subdivision.name}`,
+ channels: item.count,
+ playlist: `https://iptv-org.github.io/iptv/${item.filepath}
`
+ })
+ }
+ }
}
const table = createTable(rows, [
@@ -99,11 +111,13 @@ async function createRegionTable() {
for (const item of items) {
const code = file.getFilename(item.filepath)
const region = await api.regions.find({ code: code.toUpperCase() })
- rows.push({
- name: region ? region.name : 'Undefined',
- channels: item.count,
- playlist: `https://iptv-org.github.io/iptv/${item.filepath}
`
- })
+ if (region) {
+ rows.push({
+ name: region.name,
+ channels: item.count,
+ playlist: `https://iptv-org.github.io/iptv/${item.filepath}
`
+ })
+ }
}
const table = createTable(rows, [
diff --git a/scripts/generators/countries.js b/scripts/generators/countries.js
index 9554c4b739..10217a7103 100644
--- a/scripts/generators/countries.js
+++ b/scripts/generators/countries.js
@@ -16,10 +16,8 @@ module.exports = async function (streams = []) {
let countryRegionCodes = _.filter(regions, { countries: [country.code] }).map(
r => `r/${r.code}`
)
- const countrySubdivisionCodes = _.filter(subdivisions, { country: country.code}).map(
- r => `s/${r.code}`
- )
- const countryAreaCodes = countryRegionCodes.concat(countrySubdivisionCodes)
+ const countrySubdivisions = _.filter(subdivisions, { country: country.code })
+ const countryAreaCodes = countryRegionCodes.concat(countrySubdivisions.map(s => `s/${s.code}`))
countryAreaCodes.push(`c/${country.code}`)
let items = _.filter(streams, stream => {
@@ -27,10 +25,20 @@ module.exports = async function (streams = []) {
})
output.push({ filepath: `countries/${country.code.toLowerCase()}.m3u`, items })
- }
- let items = _.filter(streams, stream => !stream.broadcast_area.length)
- output.push({ filepath: 'countries/undefined.m3u', items })
+ for (let subdivision of countrySubdivisions) {
+ let subdivisionItems = _.filter(streams, stream => {
+ return stream.broadcast_area.includes(`s/${subdivision.code}`)
+ })
+
+ if (subdivisionItems.length) {
+ output.push({
+ filepath: `subdivisions/${subdivision.code.toLowerCase()}.m3u`,
+ items: subdivisionItems
+ })
+ }
+ }
+ }
return output
}
diff --git a/scripts/generators/regions.js b/scripts/generators/regions.js
index c238970b22..c2b08146ff 100644
--- a/scripts/generators/regions.js
+++ b/scripts/generators/regions.js
@@ -12,6 +12,8 @@ module.exports = async function (streams = []) {
const output = []
for (const region of regions) {
+ if (region.code === 'INT') continue
+
const regionCountries = region.countries
let areaCodes = regionCountries.map(code => `c/${code}`)
@@ -27,8 +29,5 @@ module.exports = async function (streams = []) {
output.push({ filepath: `regions/${region.code.toLowerCase()}.m3u`, items })
}
- let items = _.filter(streams, stream => !stream.broadcast_area.length)
- output.push({ filepath: 'regions/undefined.m3u', items })
-
return output
}
diff --git a/tests/__data__/expected/.gh-pages/countries/undefined.m3u b/tests/__data__/expected/.gh-pages/countries/undefined.m3u
deleted file mode 100644
index 275a498ee4..0000000000
--- a/tests/__data__/expected/.gh-pages/countries/undefined.m3u
+++ /dev/null
@@ -1 +0,0 @@
-#EXTM3U x-tvg-url=""
diff --git a/tests/__data__/expected/.gh-pages/regions/int.m3u b/tests/__data__/expected/.gh-pages/regions/int.m3u
deleted file mode 100644
index 9d9ca8699f..0000000000
--- a/tests/__data__/expected/.gh-pages/regions/int.m3u
+++ /dev/null
@@ -1,15 +0,0 @@
-#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-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-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="" tvg-logo="" group-title="Undefined",Daawah TV
-http://51.15.246.58:8081/daawahtv/daawahtv2/playlist.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="Zoo.ad" tvg-logo="" group-title="Undefined",Zoo (720p)
-https://iptv-all.lanesh4d0w.repl.co/andorra/zoo
-#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/playlist.m3u8
diff --git a/tests/__data__/expected/.gh-pages/regions/undefined.m3u b/tests/__data__/expected/.gh-pages/regions/undefined.m3u
deleted file mode 100644
index 275a498ee4..0000000000
--- a/tests/__data__/expected/.gh-pages/regions/undefined.m3u
+++ /dev/null
@@ -1 +0,0 @@
-#EXTM3U x-tvg-url=""
diff --git a/tests/__data__/expected/.gh-pages/subdivisions/ca-on.m3u b/tests/__data__/expected/.gh-pages/subdivisions/ca-on.m3u
new file mode 100644
index 0000000000..e9b4b94796
--- /dev/null
+++ b/tests/__data__/expected/.gh-pages/subdivisions/ca-on.m3u
@@ -0,0 +1,3 @@
+#EXTM3U x-tvg-url=""
+#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
diff --git a/tests/__data__/expected/_readme.md b/tests/__data__/expected/_readme.md
index b553a47d23..339c3a3120 100644
--- a/tests/__data__/expected/_readme.md
+++ b/tests/__data__/expected/_readme.md
@@ -185,6 +185,7 @@ Same thing, but split up into separate files:
🇰🇭 Cambodia | 1 | https://iptv-org.github.io/iptv/countries/kh.m3u |
🇨🇲 Cameroon | 1 | https://iptv-org.github.io/iptv/countries/cm.m3u |
🇨🇦 Canada | 2 | https://iptv-org.github.io/iptv/countries/ca.m3u |
+ Ontario | 1 | https://iptv-org.github.io/iptv/subdivisions/ca-on.m3u |
🇨🇻 Cape Verde | 1 | https://iptv-org.github.io/iptv/countries/cv.m3u |
🇰🇾 Cayman Islands | 1 | https://iptv-org.github.io/iptv/countries/ky.m3u |
🇨🇫 Central African Republic | 1 | https://iptv-org.github.io/iptv/countries/cf.m3u |
@@ -395,7 +396,6 @@ Same thing, but split up into separate files:
🇿🇲 Zambia | 1 | https://iptv-org.github.io/iptv/countries/zm.m3u |
🇿🇼 Zimbabwe | 1 | https://iptv-org.github.io/iptv/countries/zw.m3u |
🇦🇽 Åland | 1 | https://iptv-org.github.io/iptv/countries/ax.m3u |
- Undefined | 2 | https://iptv-org.github.io/iptv/countries/undefined.m3u |
@@ -423,29 +423,30 @@ Same thing, but split up into separate files:
Africa | 0 | https://iptv-org.github.io/iptv/regions/afr.m3u |
Americas | 1 | https://iptv-org.github.io/iptv/regions/amer.m3u |
+ Asia-Pacific | 1 | https://iptv-org.github.io/iptv/regions/apac.m3u |
Arab world | 0 | https://iptv-org.github.io/iptv/regions/arab.m3u |
- Asia | 1 | https://iptv-org.github.io/iptv/regions/asia.m3u |
- Asia-Pacific | 0 | https://iptv-org.github.io/iptv/regions/apac.m3u |
+ Association of Southeast Asian Nations | 0 | https://iptv-org.github.io/iptv/regions/asean.m3u |
+ Asia | 2 | https://iptv-org.github.io/iptv/regions/asia.m3u |
Caribbean | 0 | https://iptv-org.github.io/iptv/regions/carib.m3u |
Central Asia | 0 | https://iptv-org.github.io/iptv/regions/cas.m3u |
+ Central America | 0 | https://iptv-org.github.io/iptv/regions/cenamer.m3u |
Commonwealth of Independent States | 1 | https://iptv-org.github.io/iptv/regions/cis.m3u |
- Europe | 2 | https://iptv-org.github.io/iptv/regions/eur.m3u |
- Europe, the Middle East and Africa | 2 | https://iptv-org.github.io/iptv/regions/emea.m3u |
+ Europe, the Middle East and Africa | 3 | https://iptv-org.github.io/iptv/regions/emea.m3u |
+ Europe | 3 | https://iptv-org.github.io/iptv/regions/eur.m3u |
Hispanic America | 0 | https://iptv-org.github.io/iptv/regions/hispam.m3u |
- Latin America | 0 | https://iptv-org.github.io/iptv/regions/latam.m3u |
Latin America and the Caribbean | 0 | https://iptv-org.github.io/iptv/regions/lac.m3u |
+ Latin America | 0 | https://iptv-org.github.io/iptv/regions/latam.m3u |
Maghreb | 0 | https://iptv-org.github.io/iptv/regions/maghreb.m3u |
- Middle East | 0 | https://iptv-org.github.io/iptv/regions/mideast.m3u |
Middle East and North Africa | 0 | https://iptv-org.github.io/iptv/regions/mena.m3u |
- Nordics | 0 | https://iptv-org.github.io/iptv/regions/nord.m3u |
- North America | 1 | https://iptv-org.github.io/iptv/regions/noram.m3u |
+ Middle East | 0 | https://iptv-org.github.io/iptv/regions/mideast.m3u |
Northern America | 1 | https://iptv-org.github.io/iptv/regions/nam.m3u |
+ North America | 1 | https://iptv-org.github.io/iptv/regions/noram.m3u |
+ Nordics | 0 | https://iptv-org.github.io/iptv/regions/nord.m3u |
Oceania | 0 | https://iptv-org.github.io/iptv/regions/oce.m3u |
- South Asia | 0 | https://iptv-org.github.io/iptv/regions/sas.m3u |
+ South Asia | 1 | https://iptv-org.github.io/iptv/regions/sas.m3u |
+ South America | 0 | https://iptv-org.github.io/iptv/regions/southam.m3u |
Sub-Saharan Africa | 0 | https://iptv-org.github.io/iptv/regions/ssa.m3u |
West Africa | 0 | https://iptv-org.github.io/iptv/regions/wafr.m3u |
- Worldwide | 4 | https://iptv-org.github.io/iptv/regions/int.m3u |
- Undefined | 2 | https://iptv-org.github.io/iptv/regions/undefined.m3u |
diff --git a/tests/__data__/expected/logs/generators/countries.log b/tests/__data__/expected/logs/generators/countries.log
index 808e965546..dd5c4ae3d0 100644
--- a/tests/__data__/expected/logs/generators/countries.log
+++ b/tests/__data__/expected/logs/generators/countries.log
@@ -38,6 +38,7 @@
{"filepath":"countries/kh.m3u","count":1}
{"filepath":"countries/cm.m3u","count":1}
{"filepath":"countries/ca.m3u","count":2}
+{"filepath":"subdivisions/ca-on.m3u","count":1}
{"filepath":"countries/cv.m3u","count":1}
{"filepath":"countries/ky.m3u","count":1}
{"filepath":"countries/cf.m3u","count":1}
@@ -247,5 +248,4 @@
{"filepath":"countries/ye.m3u","count":1}
{"filepath":"countries/zm.m3u","count":1}
{"filepath":"countries/zw.m3u","count":1}
-{"filepath":"countries/ax.m3u","count":1}
-{"filepath":"countries/undefined.m3u","count":0}
\ No newline at end of file
+{"filepath":"countries/ax.m3u","count":1}
\ No newline at end of file
diff --git a/tests/__data__/expected/logs/generators/regions.log b/tests/__data__/expected/logs/generators/regions.log
index 95499a1391..d7da617692 100644
--- a/tests/__data__/expected/logs/generators/regions.log
+++ b/tests/__data__/expected/logs/generators/regions.log
@@ -1,25 +1,26 @@
{"filepath":"regions/afr.m3u","count":0}
{"filepath":"regions/amer.m3u","count":1}
-{"filepath":"regions/arab.m3u","count":0}
-{"filepath":"regions/asia.m3u","count":2}
{"filepath":"regions/apac.m3u","count":1}
+{"filepath":"regions/arab.m3u","count":0}
+{"filepath":"regions/asean.m3u","count":0}
+{"filepath":"regions/asia.m3u","count":2}
{"filepath":"regions/carib.m3u","count":0}
{"filepath":"regions/cas.m3u","count":0}
+{"filepath":"regions/cenamer.m3u","count":0}
{"filepath":"regions/cis.m3u","count":1}
-{"filepath":"regions/eur.m3u","count":3}
{"filepath":"regions/emea.m3u","count":3}
+{"filepath":"regions/eur.m3u","count":3}
{"filepath":"regions/hispam.m3u","count":0}
-{"filepath":"regions/latam.m3u","count":0}
{"filepath":"regions/lac.m3u","count":0}
+{"filepath":"regions/latam.m3u","count":0}
{"filepath":"regions/maghreb.m3u","count":0}
-{"filepath":"regions/mideast.m3u","count":0}
{"filepath":"regions/mena.m3u","count":0}
-{"filepath":"regions/nord.m3u","count":0}
-{"filepath":"regions/noram.m3u","count":1}
+{"filepath":"regions/mideast.m3u","count":0}
{"filepath":"regions/nam.m3u","count":1}
+{"filepath":"regions/noram.m3u","count":1}
+{"filepath":"regions/nord.m3u","count":0}
{"filepath":"regions/oce.m3u","count":0}
{"filepath":"regions/sas.m3u","count":1}
+{"filepath":"regions/southam.m3u","count":0}
{"filepath":"regions/ssa.m3u","count":0}
-{"filepath":"regions/wafr.m3u","count":0}
-{"filepath":"regions/int.m3u","count":6}
-{"filepath":"regions/undefined.m3u","count":0}
\ No newline at end of file
+{"filepath":"regions/wafr.m3u","count":0}
\ No newline at end of file
diff --git a/tests/__data__/input/data/regions.json b/tests/__data__/input/data/regions.json
index f0640a33ad..0741930a13 100644
--- a/tests/__data__/input/data/regions.json
+++ b/tests/__data__/input/data/regions.json
@@ -1 +1 @@
-[{"name":"Africa","code":"AFR","countries":["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"]},{"name":"Americas","code":"AMER","countries":["AG","AI","AR","AW","BB","BL","BM","BO","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"]},{"name":"Arab world","code":"ARAB","countries":["AE","BH","DJ","DZ","EG","IQ","JO","KM","KW","LB","LY","MA","MR","OM","PS","QA","SA","SD","SO","SY","TN","YE"]},{"name":"Asia","code":"ASIA","countries":["AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MV","MY","NP","OM","PH","PK","PS","QA","RU","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"]},{"name":"Asia-Pacific","code":"APAC","countries":["AF","AS","AU","BD","BN","BT","CK","CN","FJ","FM","GU","ID","IN","JP","KH","KI","KP","KR","LA","LK","MH","MM","MN","MP","MV","MY","NC","NF","NP","NR","NU","NZ","PF","PG","PH","PK","PN","PW","SB","SG","TH","TK","TL","TO","TV","TW","VN","VU","WF","WS"]},{"name":"Caribbean","code":"CARIB","countries":["AG","AI","AW","BB","BL","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"]},{"name":"Central Asia","code":"CAS","countries":["KG","KZ","TJ","TM","UZ"]},{"name":"Commonwealth of Independent States","code":"CIS","countries":["AM","AZ","BY","KG","KZ","MD","RU","TJ","UZ"]},{"name":"Europe","code":"EUR","countries":["AD","AL","AM","AT","AZ","BA","BE","BG","BY","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GE","GR","HR","HU","IE","IS","IT","KZ","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SK","SM","TR","UA","UK","VA"]},{"name":"Europe, the Middle East and Africa","code":"EMEA","countries":["AD","AE","AL","AM","AO","AT","AZ","BA","BE","BF","BG","BH","BI","BJ","BW","BY","CD","CF","CG","CH","CI","CM","CV","CY","CZ","DE","DJ","DK","DZ","EE","EG","EH","ER","ES","ET","FI","FR","GA","GE","GH","GM","GN","GQ","GR","GW","HR","HU","IE","IQ","IR","IS","IT","JO","KE","KM","KW","KZ","LB","LI","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MK","ML","MR","MT","MU","MW","MZ","NA","NE","NG","NL","NO","OM","PL","PS","PT","QA","RE","RO","RS","RU","RW","SA","SC","SD","SE","SH","SI","SK","SL","SM","SN","SO","SS","ST","SY","SZ","TD","TF","TG","TN","TR","TZ","UA","UG","UK","VA","YE","YT","ZA","ZM","ZW"]},{"name":"Hispanic America","code":"HISPAM","countries":["AR","BO","CL","CO","CR","CU","DO","EC","GT","HN","MX","NI","PA","PE","PR","PY","SV","UY","VE"]},{"name":"Latin America","code":"LATAM","countries":["AR","BL","BO","BR","CL","CO","CR","CU","DO","EC","GF","GP","GT","HN","HT","MF","MQ","MX","NI","PA","PE","PR","PY","SV","UY","VE"]},{"name":"Latin America and the Caribbean","code":"LAC","countries":["AG","AI","AR","AW","BB","BL","BO","BR","BS","CL","CO","CR","CU","CW","DM","DO","EC","GD","GF","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SV","SX","TC","TT","UY","VC","VE","VG","VI"]},{"name":"Maghreb","code":"MAGHREB","countries":["DZ","LY","MA","MR","TN"]},{"name":"Middle East","code":"MIDEAST","countries":["AE","BH","CY","EG","IL","IQ","IR","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"]},{"name":"Middle East and North Africa","code":"MENA","countries":["AE","BH","CY","DJ","DZ","EG","EH","IL","IQ","IR","JO","KW","LB","LY","MA","OM","PS","QA","SA","SD","SY","TN","TR","YE"]},{"name":"Nordics","code":"NORD","countries":["AX","DK","FO","FI","IS","NO","SE"]},{"name":"North America","code":"NORAM","countries":["AG","AI","AW","BB","BL","BM","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"]},{"name":"Northern America","code":"NAM","countries":["BM","CA","GL","PM","US"]},{"name":"Oceania","code":"OCE","countries":["AS","AU","CK","FJ","FM","GU","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","SB","TK","TO","TV","VU","WF","WS"]},{"name":"South Asia","code":"SAS","countries":["AF","BD","BT","IN","LK","MV","NP","PK"]},{"name":"Sub-Saharan Africa","code":"SSA","countries":["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RW","SC","SD","SL","SN","SO","SS","ST","SZ","TD","TG","TZ","UG","ZA","ZM","ZW"]},{"name":"West Africa","code":"WAFR","countries":["BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"]},{"name":"Worldwide","code":"INT","countries":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","UK","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"]}]
\ No newline at end of file
+[{"code":"AFR","name":"Africa","countries":["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","DZ","EG","EH","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","LY","MA","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RE","RW","SC","SD","SH","SL","SN","SO","SS","ST","SZ","TD","TF","TG","TN","TZ","UG","YT","ZA","ZM","ZW"]},{"code":"AMER","name":"Americas","countries":["AG","AI","AR","AW","BB","BL","BM","BO","BR","BS","BV","BZ","CA","CL","CO","CR","CU","CW","DM","DO","EC","FK","GD","GF","GL","GP","GS","GT","GY","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PM","PR","PY","SR","SV","SX","TC","TT","US","UY","VC","VE","VG","VI"]},{"code":"APAC","name":"Asia-Pacific","countries":["AF","AS","AU","BD","BN","BT","CK","CN","FJ","FM","GU","ID","IN","JP","KH","KI","KP","KR","LA","LK","MH","MM","MN","MP","MV","MY","NC","NF","NP","NR","NU","NZ","PF","PG","PH","PK","PN","PW","SB","SG","TH","TK","TL","TO","TV","TW","VN","VU","WF","WS"]},{"code":"ARAB","name":"Arab world","countries":["AE","BH","DJ","DZ","EG","IQ","JO","KM","KW","LB","LY","MA","MR","OM","PS","QA","SA","SD","SO","SY","TN","YE"]},{"code":"ASEAN","name":"Association of Southeast Asian Nations","countries":["BN","KH","ID","LA","MY","MM","PH","SG","TH","VN"]},{"code":"ASIA","name":"Asia","countries":["AE","AF","AM","AZ","BD","BH","BN","BT","CN","CY","GE","ID","IL","IN","IQ","IR","JO","JP","KG","KH","KP","KR","KW","KZ","LA","LB","LK","MM","MN","MV","MY","NP","OM","PH","PK","PS","QA","RU","SA","SG","SY","TH","TJ","TL","TM","TR","TW","UZ","VN","YE"]},{"code":"CARIB","name":"Caribbean","countries":["AG","AI","AW","BB","BL","BS","CU","CW","DM","DO","GD","GP","HT","JM","KN","KY","LC","MF","MQ","MS","PR","SX","TC","TT","VC","VG","VI"]},{"code":"CAS","name":"Central Asia","countries":["KG","KZ","TJ","TM","UZ"]},{"code":"CENAMER","name":"Central America","countries":["BZ","CR","SV","GT","HN","NI","PA"]},{"code":"CIS","name":"Commonwealth of Independent States","countries":["AM","AZ","BY","KG","KZ","MD","RU","TJ","UZ"]},{"code":"EMEA","name":"Europe, the Middle East and Africa","countries":["AD","AE","AL","AM","AO","AT","AZ","BA","BE","BF","BG","BH","BI","BJ","BW","BY","CD","CF","CG","CH","CI","CM","CV","CY","CZ","DE","DJ","DK","DZ","EE","EG","EH","ER","ES","ET","FI","FR","GA","GE","GH","GM","GN","GQ","GR","GW","HR","HU","IE","IQ","IR","IS","IT","JO","KE","KM","KW","KZ","LB","LI","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MG","MK","ML","MR","MT","MU","MW","MZ","NA","NE","NG","NL","NO","OM","PL","PS","PT","QA","RE","RO","RS","RU","RW","SA","SC","SD","SE","SH","SI","SK","SL","SM","SN","SO","SS","ST","SY","SZ","TD","TF","TG","TN","TR","TZ","UA","UG","UK","VA","YE","YT","ZA","ZM","ZW"]},{"code":"EUR","name":"Europe","countries":["AD","AL","AM","AT","AZ","BA","BE","BG","BY","CH","CY","CZ","DE","DK","EE","ES","FI","FR","GE","GR","HR","HU","IE","IS","IT","KZ","LI","LT","LU","LV","MC","MD","ME","MK","MT","NL","NO","PL","PT","RO","RS","RU","SE","SI","SK","SM","TR","UA","UK","VA"]},{"code":"HISPAM","name":"Hispanic America","countries":["AR","BO","CL","CO","CR","CU","DO","EC","GT","HN","MX","NI","PA","PE","PR","PY","SV","UY","VE"]},{"code":"INT","name":"Worldwide","countries":["AD","AE","AF","AG","AI","AL","AM","AO","AQ","AR","AS","AT","AU","AW","AX","AZ","BA","BB","BD","BE","BF","BG","BH","BI","BJ","BL","BM","BN","BO","BQ","BR","BS","BT","BV","BW","BY","BZ","CA","CC","CD","CF","CG","CH","CI","CK","CL","CM","CN","CO","CR","CU","CV","CW","CX","CY","CZ","DE","DJ","DK","DM","DO","DZ","EC","EE","EG","EH","ER","ES","ET","FI","FJ","FK","FM","FO","FR","GA","UK","GD","GE","GF","GG","GH","GI","GL","GM","GN","GP","GQ","GR","GS","GT","GU","GW","GY","HK","HM","HN","HR","HT","HU","ID","IE","IL","IM","IN","IO","IQ","IR","IS","IT","JE","JM","JO","JP","KE","KG","KH","KI","KM","KN","KP","KR","KW","KY","KZ","LA","LB","LC","LI","LK","LR","LS","LT","LU","LV","LY","MA","MC","MD","ME","MF","MG","MH","MK","ML","MM","MN","MO","MP","MQ","MR","MS","MT","MU","MV","MW","MX","MY","MZ","NA","NC","NE","NF","NG","NI","NL","NO","NP","NR","NU","NZ","OM","PA","PE","PF","PG","PH","PK","PL","PM","PN","PR","PS","PT","PW","PY","QA","RE","RO","RS","RU","RW","SA","SB","SC","SD","SE","SG","SH","SI","SJ","SK","SL","SM","SN","SO","SR","SS","ST","SV","SX","SY","SZ","TC","TD","TF","TG","TH","TJ","TK","TL","TM","TN","TO","TR","TT","TV","TW","TZ","UA","UG","UM","US","UY","UZ","VA","VC","VE","VG","VI","VN","VU","WF","WS","XK","YE","YT","ZA","ZM","ZW"]},{"code":"LAC","name":"Latin America and the Caribbean","countries":["AG","AI","AR","AW","BB","BL","BO","BR","BS","CL","CO","CR","CU","CW","DM","DO","EC","GD","GF","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PE","PR","PY","SV","SX","TC","TT","UY","VC","VE","VG","VI"]},{"code":"LATAM","name":"Latin America","countries":["AR","BL","BO","BR","CL","CO","CR","CU","DO","EC","GF","GP","GT","HN","HT","MF","MQ","MX","NI","PA","PE","PR","PY","SV","UY","VE"]},{"code":"MAGHREB","name":"Maghreb","countries":["DZ","LY","MA","MR","TN"]},{"code":"MENA","name":"Middle East and North Africa","countries":["AE","BH","CY","DJ","DZ","EG","EH","IL","IQ","IR","JO","KW","LB","LY","MA","OM","PS","QA","SA","SD","SY","TN","TR","YE"]},{"code":"MIDEAST","name":"Middle East","countries":["AE","BH","CY","EG","IL","IQ","IR","JO","KW","LB","OM","PS","QA","SA","SY","TR","YE"]},{"code":"NAM","name":"Northern America","countries":["BM","CA","GL","PM","US"]},{"code":"NORAM","name":"North America","countries":["AG","AI","AW","BB","BL","BM","BS","BZ","CA","CR","CU","CW","DM","DO","GD","GL","GP","GT","HN","HT","JM","KN","KY","LC","MF","MQ","MS","MX","NI","PA","PM","PR","SV","SX","TC","TT","US","VC","VG","VI"]},{"code":"NORD","name":"Nordics","countries":["AX","DK","FO","FI","IS","NO","SE"]},{"code":"OCE","name":"Oceania","countries":["AS","AU","CK","FJ","FM","GU","KI","MH","MP","NC","NF","NR","NU","NZ","PF","PG","PN","PW","SB","TK","TO","TV","VU","WF","WS"]},{"code":"SAS","name":"South Asia","countries":["AF","BD","BT","IN","LK","MV","NP","PK"]},{"code":"SOUTHAM","name":"South America","countries":["AR","BO","BR","CL","CO","EC","PY","PE","UY","VE","BV","FK","GF","GY","GS","SR"]},{"code":"SSA","name":"Sub-Saharan Africa","countries":["AO","BF","BI","BJ","BW","CD","CF","CG","CI","CM","CV","DJ","ER","ET","GA","GH","GM","GN","GQ","GW","KE","KM","LR","LS","MG","ML","MR","MU","MW","MZ","NA","NE","NG","RW","SC","SD","SL","SN","SO","SS","ST","SZ","TD","TG","TZ","UG","ZA","ZM","ZW"]},{"code":"WAFR","name":"West Africa","countries":["BF","BJ","CI","CV","GH","GM","GN","GW","LR","ML","MR","NE","NG","SH","SL","SN","TG"]}]
\ No newline at end of file
diff --git a/tests/__data__/input/logs/generators/countries.log b/tests/__data__/input/logs/generators/countries.log
index 9d56d14b6f..1867641c06 100644
--- a/tests/__data__/input/logs/generators/countries.log
+++ b/tests/__data__/input/logs/generators/countries.log
@@ -38,6 +38,7 @@
{"filepath":"countries/kh.m3u","count":1}
{"filepath":"countries/cm.m3u","count":1}
{"filepath":"countries/ca.m3u","count":2}
+{"filepath":"subdivisions/ca-on.m3u","count":1}
{"filepath":"countries/cv.m3u","count":1}
{"filepath":"countries/ky.m3u","count":1}
{"filepath":"countries/cf.m3u","count":1}
diff --git a/tests/__data__/input/logs/generators/regions.log b/tests/__data__/input/logs/generators/regions.log
index ddf9139e0a..d7da617692 100644
--- a/tests/__data__/input/logs/generators/regions.log
+++ b/tests/__data__/input/logs/generators/regions.log
@@ -1,25 +1,26 @@
{"filepath":"regions/afr.m3u","count":0}
{"filepath":"regions/amer.m3u","count":1}
+{"filepath":"regions/apac.m3u","count":1}
{"filepath":"regions/arab.m3u","count":0}
-{"filepath":"regions/asia.m3u","count":1}
-{"filepath":"regions/apac.m3u","count":0}
+{"filepath":"regions/asean.m3u","count":0}
+{"filepath":"regions/asia.m3u","count":2}
{"filepath":"regions/carib.m3u","count":0}
{"filepath":"regions/cas.m3u","count":0}
+{"filepath":"regions/cenamer.m3u","count":0}
{"filepath":"regions/cis.m3u","count":1}
-{"filepath":"regions/eur.m3u","count":2}
-{"filepath":"regions/emea.m3u","count":2}
+{"filepath":"regions/emea.m3u","count":3}
+{"filepath":"regions/eur.m3u","count":3}
{"filepath":"regions/hispam.m3u","count":0}
-{"filepath":"regions/latam.m3u","count":0}
{"filepath":"regions/lac.m3u","count":0}
+{"filepath":"regions/latam.m3u","count":0}
{"filepath":"regions/maghreb.m3u","count":0}
-{"filepath":"regions/mideast.m3u","count":0}
{"filepath":"regions/mena.m3u","count":0}
-{"filepath":"regions/nord.m3u","count":0}
-{"filepath":"regions/noram.m3u","count":1}
+{"filepath":"regions/mideast.m3u","count":0}
{"filepath":"regions/nam.m3u","count":1}
+{"filepath":"regions/noram.m3u","count":1}
+{"filepath":"regions/nord.m3u","count":0}
{"filepath":"regions/oce.m3u","count":0}
-{"filepath":"regions/sas.m3u","count":0}
+{"filepath":"regions/sas.m3u","count":1}
+{"filepath":"regions/southam.m3u","count":0}
{"filepath":"regions/ssa.m3u","count":0}
-{"filepath":"regions/wafr.m3u","count":0}
-{"filepath":"regions/int.m3u","count":4}
-{"filepath":"regions/undefined.m3u","count":2}
\ No newline at end of file
+{"filepath":"regions/wafr.m3u","count":0}
\ No newline at end of file