feat: enhance schedule slot handling with episode details and duration calculation

This commit is contained in:
2026-03-11 22:30:05 +01:00
parent 0f1b9c11fe
commit ee64fc0b8a
3 changed files with 101 additions and 24 deletions

View File

@@ -3,7 +3,12 @@ import { cn } from "@/lib/utils";
export interface ScheduleSlot {
id: string;
/** Headline: series name for episodes, film title for everything else. */
title: string;
/** Secondary line: "S1 · E3 · Episode Title" for episodes, year for movies. */
subtitle?: string | null;
/** Rounded slot duration in minutes. */
durationMins: number;
startTime: string; // "HH:MM"
endTime: string; // "HH:MM"
isCurrent?: boolean;
@@ -50,8 +55,17 @@ export function ScheduleOverlay({ channelName, slots }: ScheduleOverlayProps) {
>
{slot.title}
</p>
{slot.subtitle && (
<p className={cn(
"truncate text-xs leading-snug",
slot.isCurrent ? "text-zinc-400" : "text-zinc-600"
)}>
{slot.subtitle}
</p>
)}
<p className="mt-0.5 font-mono text-[10px] text-zinc-600">
{slot.startTime} {slot.endTime}
{" · "}{slot.durationMins}m
</p>
</div>
</li>