feat: enhance schedule slot handling with episode details and duration calculation
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user