mirror of
https://github.com/iptv-org/iptv
synced 2025-12-17 19:07:37 -05:00
Update scripts
This commit is contained in:
@@ -8,6 +8,7 @@ export class Subdivision {
|
||||
countryCode: string
|
||||
country?: Country
|
||||
parentCode?: string
|
||||
parent?: Subdivision
|
||||
regions?: Collection
|
||||
cities?: Collection
|
||||
|
||||
@@ -40,6 +41,14 @@ export class Subdivision {
|
||||
return this
|
||||
}
|
||||
|
||||
withParent(subdivisionsKeyByCode: Dictionary): this {
|
||||
if (!this.parentCode) return this
|
||||
|
||||
this.parent = subdivisionsKeyByCode.get(this.parentCode)
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
getRegions(): Collection {
|
||||
if (!this.regions) return new Collection()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user