mirror of
https://github.com/iptv-org/epg
synced 2025-12-16 18:37:01 -05:00
Update update-readme.ts
This commit is contained in:
@@ -68,13 +68,7 @@ async function main() {
|
|||||||
emptyGuides
|
emptyGuides
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!code.includes('-')) {
|
if (code.startsWith('us-')) {
|
||||||
const country: Country | undefined = countries[code]
|
|
||||||
if (!country) return
|
|
||||||
guide.flag = country.flag
|
|
||||||
guide.name = country.name
|
|
||||||
guidesByCountry.push(guide)
|
|
||||||
} else if (code.startsWith('us-')) {
|
|
||||||
const [_, stateCode] = code.split('-')
|
const [_, stateCode] = code.split('-')
|
||||||
const state: State | undefined = countries['us']
|
const state: State | undefined = countries['us']
|
||||||
? countries['us'].states[stateCode]
|
? countries['us'].states[stateCode]
|
||||||
@@ -90,6 +84,13 @@ async function main() {
|
|||||||
if (!province) return
|
if (!province) return
|
||||||
guide.name = province.name
|
guide.name = province.name
|
||||||
guidesByCanadaProvince.push(guide)
|
guidesByCanadaProvince.push(guide)
|
||||||
|
} else {
|
||||||
|
const [countryCode] = code.split('-')
|
||||||
|
const country: Country | undefined = countries[countryCode]
|
||||||
|
if (!country) return
|
||||||
|
guide.flag = country.flag
|
||||||
|
guide.name = country.name
|
||||||
|
guidesByCountry.push(guide)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user