From 8b8c844e243429c002d36b198dfb44b8b844bf44 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Sat, 17 Feb 2024 17:21:47 -0800 Subject: chore(hololive): remove unused sorter --- src/routes/hololive/+page.svelte | 21 +-------------------- 1 file changed, 1 insertion(+), 20 deletions(-) (limited to 'src/routes') diff --git a/src/routes/hololive/+page.svelte b/src/routes/hololive/+page.svelte index 099a09fc..e5d31056 100644 --- a/src/routes/hololive/+page.svelte +++ b/src/routes/hololive/+page.svelte @@ -45,24 +45,6 @@ }; const typeSchedule = (schedule: any) => schedule as ParseResult; - - const getClosestUpcomingPinnedStreams = (schedule: ParseResult) => { - const now = Date.now(); - let closestUpcomingPinnedStreams = new Map(); - - schedule.lives.forEach((live) => { - const liveTime = new Date(live.time).getTime(); - - if (liveTime > now && pinnedStreams.includes(live.streamer)) { - const existing = closestUpcomingPinnedStreams.get(live.streamer); - - if (!existing || liveTime < new Date(existing.time).getTime()) - closestUpcomingPinnedStreams.set(live.streamer, live); - } - }); - - return closestUpcomingPinnedStreams; - }; @@ -79,9 +61,8 @@ {:then untypedSchedule} {@const schedule = typeSchedule(parseScheduleHtml(untypedSchedule))} - {@const closestUpcomingPinnedStreams = getClosestUpcomingPinnedStreams(schedule)} - + {:catch} {$locale().hololive.parseError} -- cgit v1.2.3