From ef62c993e74293966a46b8848ae4ef1800ec1e58 Mon Sep 17 00:00:00 2001 From: freearhey <7253922+freearhey@users.noreply.github.com> Date: Fri, 17 Apr 2026 00:14:55 +0300 Subject: [PATCH] Update update.ts --- scripts/commands/sites/update.ts | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/scripts/commands/sites/update.ts b/scripts/commands/sites/update.ts index 862762b81..28ee84ebb 100644 --- a/scripts/commands/sites/update.ts +++ b/scripts/commands/sites/update.ts @@ -40,8 +40,7 @@ async function main() { (channel: epgGrabber.Channel) => new Channel(channel.toObject()) ) - site.totalChannels += channels.count() - site.markedChannels += channels.filter((channel: Channel) => channel.xmltv_id).count() + site.channels = site.channels.concat(channels) } sites.add(site) @@ -53,8 +52,13 @@ async function main() { rows.add( new Collection([ { value: `${site.domain}` }, - { value: site.totalChannels.toString(), align: 'right' }, - { value: site.markedChannels.toString(), align: 'right' }, + { + value: site.channels + .uniqBy((channel: Channel) => channel.site_id) + .count() + .toString(), + align: 'right' + }, { value: site.getStatus().emoji, align: 'center' }, { value: site.getIssueUrls().all().join(', ') } ]) @@ -66,7 +70,7 @@ async function main() { rows, new Collection([ { name: 'Site', align: 'left' }, - { name: 'Channels
(total / with xmltv-id)', colspan: 2, align: 'left' }, + { name: 'Channels', align: 'left' }, { name: 'Status', align: 'left' }, { name: 'Notes', align: 'left' } ])