Merge pull request #8711 from iptv-org/patch-2022.09

Patch 2022.09
This commit is contained in:
LaneSh4d0w 2022-09-13 17:54:07 +02:00 committed by GitHub
commit fb92df7f9e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
13 changed files with 85 additions and 74 deletions

View File

@ -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: `<code>https://iptv-org.github.io/iptv/${item.filepath}</code>`
})
if (country) {
rows.push({
name: `${country.flag} ${country.name}`,
channels: item.count,
playlist: `<code>https://iptv-org.github.io/iptv/${item.filepath}</code>`
})
} else {
const subdivision = await api.subdivisions.find({ code: code.toUpperCase() })
if (subdivision) {
rows.push({
name: `&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;${subdivision.name}`,
channels: item.count,
playlist: `<code>https://iptv-org.github.io/iptv/${item.filepath}</code>`
})
}
}
}
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: `<code>https://iptv-org.github.io/iptv/${item.filepath}</code>`
})
if (region) {
rows.push({
name: region.name,
channels: item.count,
playlist: `<code>https://iptv-org.github.io/iptv/${item.filepath}</code>`
})
}
}
const table = createTable(rows, [

View File

@ -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
}

View File

@ -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
}

View File

@ -1 +0,0 @@
#EXTM3U x-tvg-url=""

View File

@ -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

View File

@ -1 +0,0 @@
#EXTM3U x-tvg-url=""

View File

@ -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

View File

@ -185,6 +185,7 @@ Same thing, but split up into separate files:
<tr><td>🇰🇭 Cambodia</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/kh.m3u</code></td></tr>
<tr><td>🇨🇲 Cameroon</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/cm.m3u</code></td></tr>
<tr><td>🇨🇦 Canada</td><td align="right">2</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/ca.m3u</code></td></tr>
<tr><td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Ontario</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/subdivisions/ca-on.m3u</code></td></tr>
<tr><td>🇨🇻 Cape Verde</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/cv.m3u</code></td></tr>
<tr><td>🇰🇾 Cayman Islands</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/ky.m3u</code></td></tr>
<tr><td>🇨🇫 Central African Republic</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/cf.m3u</code></td></tr>
@ -395,7 +396,6 @@ Same thing, but split up into separate files:
<tr><td>🇿🇲 Zambia</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/zm.m3u</code></td></tr>
<tr><td>🇿🇼 Zimbabwe</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/zw.m3u</code></td></tr>
<tr><td>🇦🇽 Åland</td><td align="right">1</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/ax.m3u</code></td></tr>
<tr><td>Undefined</td><td align="right">2</td><td nowrap><code>https://iptv-org.github.io/iptv/countries/undefined.m3u</code></td></tr>
</tbody>
</table>
@ -423,29 +423,30 @@ Same thing, but split up into separate files:
<tbody>
<tr><td align="left">Africa</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/afr.m3u</code></td></tr>
<tr><td align="left">Americas</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/amer.m3u</code></td></tr>
<tr><td align="left">Asia-Pacific</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/apac.m3u</code></td></tr>
<tr><td align="left">Arab world</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/arab.m3u</code></td></tr>
<tr><td align="left">Asia</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/asia.m3u</code></td></tr>
<tr><td align="left">Asia-Pacific</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/apac.m3u</code></td></tr>
<tr><td align="left">Association of Southeast Asian Nations</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/asean.m3u</code></td></tr>
<tr><td align="left">Asia</td><td align="right">2</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/asia.m3u</code></td></tr>
<tr><td align="left">Caribbean</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/carib.m3u</code></td></tr>
<tr><td align="left">Central Asia</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/cas.m3u</code></td></tr>
<tr><td align="left">Central America</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/cenamer.m3u</code></td></tr>
<tr><td align="left">Commonwealth of Independent States</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/cis.m3u</code></td></tr>
<tr><td align="left">Europe</td><td align="right">2</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/eur.m3u</code></td></tr>
<tr><td align="left">Europe, the Middle East and Africa</td><td align="right">2</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/emea.m3u</code></td></tr>
<tr><td align="left">Europe, the Middle East and Africa</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/emea.m3u</code></td></tr>
<tr><td align="left">Europe</td><td align="right">3</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/eur.m3u</code></td></tr>
<tr><td align="left">Hispanic America</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/hispam.m3u</code></td></tr>
<tr><td align="left">Latin America</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/latam.m3u</code></td></tr>
<tr><td align="left">Latin America and the Caribbean</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/lac.m3u</code></td></tr>
<tr><td align="left">Latin America</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/latam.m3u</code></td></tr>
<tr><td align="left">Maghreb</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/maghreb.m3u</code></td></tr>
<tr><td align="left">Middle East</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/mideast.m3u</code></td></tr>
<tr><td align="left">Middle East and North Africa</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/mena.m3u</code></td></tr>
<tr><td align="left">Nordics</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/nord.m3u</code></td></tr>
<tr><td align="left">North America</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/noram.m3u</code></td></tr>
<tr><td align="left">Middle East</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/mideast.m3u</code></td></tr>
<tr><td align="left">Northern America</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/nam.m3u</code></td></tr>
<tr><td align="left">North America</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/noram.m3u</code></td></tr>
<tr><td align="left">Nordics</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/nord.m3u</code></td></tr>
<tr><td align="left">Oceania</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/oce.m3u</code></td></tr>
<tr><td align="left">South Asia</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/sas.m3u</code></td></tr>
<tr><td align="left">South Asia</td><td align="right">1</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/sas.m3u</code></td></tr>
<tr><td align="left">South America</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/southam.m3u</code></td></tr>
<tr><td align="left">Sub-Saharan Africa</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/ssa.m3u</code></td></tr>
<tr><td align="left">West Africa</td><td align="right">0</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/wafr.m3u</code></td></tr>
<tr><td align="left">Worldwide</td><td align="right">4</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/int.m3u</code></td></tr>
<tr><td align="left">Undefined</td><td align="right">2</td><td align="left" nowrap><code>https://iptv-org.github.io/iptv/regions/undefined.m3u</code></td></tr>
</tbody>
</table>

View File

@ -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}
{"filepath":"countries/ax.m3u","count":1}

View File

@ -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}
{"filepath":"regions/wafr.m3u","count":0}

File diff suppressed because one or more lines are too long

View File

@ -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}

View File

@ -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}
{"filepath":"regions/wafr.m3u","count":0}