mirror of
https://github.com/iptv-org/database.git
synced 2024-11-22 02:44:10 -05:00
Update update.ts
This commit is contained in:
parent
7ab66d6c7f
commit
bf09e54624
1 changed files with 9 additions and 7 deletions
|
@ -84,19 +84,19 @@ async function editChannels({ loader, idCreator }: { loader: IssueLoader; idCrea
|
||||||
channelId = idCreator.create(name, country)
|
channelId = idCreator.create(name, country)
|
||||||
}
|
}
|
||||||
|
|
||||||
found.update({
|
const updated = new Channel({
|
||||||
id: channelId,
|
id: channelId,
|
||||||
name: data.get('name'),
|
name: data.get('name'),
|
||||||
alt_names: data.get('alt_names'),
|
alt_names: data.has('alt_names') ? data.get('alt_names').split(';') : [],
|
||||||
network: data.get('network'),
|
network: data.get('network'),
|
||||||
owners: data.get('owners'),
|
owners: data.has('owners') ? data.get('owners').split(';') : [],
|
||||||
country: data.get('country'),
|
country: data.get('country'),
|
||||||
subdivision: data.get('subdivision'),
|
subdivision: data.get('subdivision'),
|
||||||
city: data.get('city'),
|
city: data.get('city'),
|
||||||
broadcast_area: data.get('broadcast_area'),
|
broadcast_area: data.has('broadcast_area') ? data.get('broadcast_area').split(';') : [],
|
||||||
languages: data.get('languages'),
|
languages: data.has('languages') ? data.get('languages').split(';') : [],
|
||||||
categories: data.get('categories'),
|
categories: data.has('categories') ? data.get('categories').split(';') : [],
|
||||||
is_nsfw: data.get('is_nsfw'),
|
is_nsfw: data.has('is_nsfw') ? data.get('is_nsfw') === 'TRUE' : false,
|
||||||
launched: data.get('launched'),
|
launched: data.get('launched'),
|
||||||
closed: data.get('closed'),
|
closed: data.get('closed'),
|
||||||
replaced_by: data.get('replaced_by'),
|
replaced_by: data.get('replaced_by'),
|
||||||
|
@ -104,6 +104,8 @@ async function editChannels({ loader, idCreator }: { loader: IssueLoader; idCrea
|
||||||
logo: data.get('logo')
|
logo: data.get('logo')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
found.merge(updated)
|
||||||
|
|
||||||
processedIssues.push(issue)
|
processedIssues.push(issue)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue