mirror of
https://github.com/iptv-org/iptv.git
synced 2025-05-11 17:40:03 -04:00
Update scripts
This commit is contained in:
parent
e0b0de6b2b
commit
f32a3f9e77
5 changed files with 64 additions and 23 deletions
|
@ -122,17 +122,15 @@ export class Feed {
|
|||
return this
|
||||
}
|
||||
|
||||
withBroadcastRegions(regions: Collection, regionsGroupedByCode: Dictionary): this {
|
||||
withBroadcastRegions(regions: Collection): this {
|
||||
if (!this.broadcastCountries) return this
|
||||
const countriesCodes = this.broadcastCountries.map((country: Country) => country.code)
|
||||
|
||||
const broadcastRegions = regions.filter((region: Region) =>
|
||||
region.countryCodes.intersects(countriesCodes)
|
||||
)
|
||||
this.broadcastRegions = regions.filter((region: Region) => {
|
||||
if (region.code === 'INT') return false
|
||||
|
||||
if (this.isInternational()) broadcastRegions.add(regionsGroupedByCode.get('INT'))
|
||||
|
||||
this.broadcastRegions = broadcastRegions
|
||||
return region.countryCodes.intersects(countriesCodes)
|
||||
})
|
||||
|
||||
return this
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue