feat: save watch progress

This commit is contained in:
2026-04-18 18:24:43 +02:00
parent 026a105e12
commit c1ee5df94c
12 changed files with 252 additions and 56 deletions

View File

@@ -14,6 +14,7 @@ type WatchPageData struct {
MalID int
Title string
CurrentEpisode string
StartTimeSeconds float64
CurrentStatus string
InitialMode string
AvailableModes []string
@@ -192,10 +193,12 @@ templ VideoPlayer(data WatchPageData) {
{{ streamURL := buildStreamURL(data.InitialMode, data.ModeSources) }}
<div
class="flex flex-col gap-4 w-full"
data-mal-id={ fmt.Sprintf("%d", data.MalID) }
data-video-player
data-stream-url="/watch/proxy/stream"
data-preview-map-url="/watch/proxy/preview-map"
data-current-episode={ data.CurrentEpisode }
data-start-time-seconds={ fmt.Sprintf("%.3f", data.StartTimeSeconds) }
data-initial-mode={ data.InitialMode }
data-available-modes={ toJSON(data.AvailableModes) }
data-mode-sources={ toJSON(data.ModeSources) }