fix: use exported field names for EpisodeData in watch template

This commit is contained in:
2026-05-13 12:43:29 +02:00
parent 0e25f98f37
commit 77ad87bbd8

View File

@@ -157,8 +157,8 @@
<div class="grid grid-cols-5 gap-1 mt-2" data-episode-grid>
{{range $episodes}}
{{$isCurrent := eq (printf "%v" .MalID) $currentEpID}}
{{$isFiller := .Filler}}
{{$isRecap := .Recap}}
{{$isFiller := .IsFiller}}
{{$isRecap := .IsRecap}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{.MalID}}" class="flex items-center justify-center py-2 text-xs transition-colors {{if $isFiller}}bg-yellow-500/20 text-yellow-400{{else if $isRecap}}bg-blue-500/20 text-blue-400{{else}}text-foreground-muted hover:bg-foreground/5{{end}} {{if $isCurrent}}bg-accent/20 text-accent ring-1 ring-accent{{end}}" data-episode-id="{{.MalID}}" data-episode-index="{{.MalID}}" data-episode-title="{{.Title}}">
{{.MalID}}
</a>
@@ -168,8 +168,8 @@
<div class="flex min-h-0 flex-1 flex-col gap-1 pr-2 pb-4 scrollbar-hide mt-2 overflow-y-auto" data-episode-list style="overscroll-behavior-y: contain">
{{range $episodes}}
{{$isCurrent := eq (printf "%v" .MalID) $currentEpID}}
{{$isFiller := .Filler}}
{{$isRecap := .Recap}}
{{$isFiller := .IsFiller}}
{{$isRecap := .IsRecap}}
<a href="/anime/{{$anime.MalID}}/watch?ep={{.MalID}}" class="flex items-center gap-3 px-3 py-2 transition-colors hover:bg-foreground/5 text-left {{if $isFiller}}border-l-2 border-l-yellow-500{{else if $isRecap}}border-l-2 border-l-blue-500{{end}} {{if $isCurrent}}bg-accent/20{{end}}" data-episode-id="{{.MalID}}" data-episode-title="{{.Title}}">
<span class="w-10 shrink-0 text-xs font-normal text-foreground-muted tabular-nums">EP{{.MalID}}</span>
<span class="truncate text-sm {{if $isFiller}}text-yellow-400{{else if $isRecap}}text-blue-400{{else}}text-foreground-muted{{end}}" data-episode-title>{{.Title}}</span>