fix: skippable progress

fix: dont show dropped on schedule
This commit is contained in:
ThaUnknown 2025-05-01 01:27:34 +02:00
parent 78d6037272
commit 124e97f0a7
No known key found for this signature in database
3 changed files with 6 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "ui",
"version": "6.1.6",
"version": "6.1.7",
"license": "BUSL-1.1",
"private": true,
"packageManager": "pnpm@9.14.4",

View file

@ -48,8 +48,9 @@
interface DayAirTimes { day: { date: Date, number: number }, episodes: Array<ResultOf<typeof ScheduleMedia> & { episode: number, airTime: Date }> }
function aggregate (data: ResultOf<typeof Schedule>, dayList: Array<{ date: Date, number: number }>) {
// join media from all queries into single list
const mediaList = [...data.curr1?.media ?? [], ...data.curr2?.media ?? [], ...data.curr3?.media ?? [], ...data.residue?.media ?? [], ...data.next1?.media ?? [], ...data.next2?.media ?? []].filter((v, i, a) => v != null && a.findIndex(s => s?.id === v.id) === i) as Array<ResultOf<typeof ScheduleMedia>>
// join media from all queries into single list, de-duplicate it, and make sure it's not dropped
const mediaList = [...data.curr1?.media ?? [], ...data.curr2?.media ?? [], ...data.curr3?.media ?? [], ...data.residue?.media ?? [], ...data.next1?.media ?? [], ...data.next2?.media ?? []]
.filter((v, i, a) => v != null && a.findIndex(s => s?.id === v.id) === i && v.mediaListEntry?.status !== 'DROPPED') as Array<ResultOf<typeof ScheduleMedia>>
const dayMap: Record<string, DayAirTimes | undefined> = Object.fromEntries(dayList.map(day => [+day.date, { day, episodes: [] }]))

View file

@ -20,13 +20,13 @@
</div>
</div>
<div class='w-20 flex flex-col items-center z-10 shrink-0 {step > 0 ? 'text-white' : 'text-muted-foreground'}'>
<Badge variant={step > 0 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 0 ? 'text-black' : 'text-muted-foreground'}' href='../network/'><Network /></Badge>
<Badge variant={step > 0 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 0 ? 'text-black' : 'text-muted-foreground'}' href={step > 1 ? '../network/' : undefined}><Network /></Badge>
<div class='mt-3 font-bold'>
Network
</div>
</div>
<div class='w-20 flex flex-col items-center z-10 shrink-0 {step > 1 ? 'text-white' : 'text-muted-foreground'}'>
<Badge variant={step > 1 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 1 ? 'text-black' : 'text-muted-foreground'}' href='../extensions/'><Puzzle /></Badge>
<Badge variant={step > 1 ? 'default' : 'secondary'} class='w-12 h-12 rounded-[50%] flex justify-center {step > 1 ? 'text-black' : 'text-muted-foreground'}'><Puzzle /></Badge>
<div class='mt-3 font-bold'>
Extensions
</div>