fix: update watchlist service tests

This commit is contained in:
2026-05-02 17:26:53 +02:00
committed by Mikkel Elvers
parent 93a7f69e7a
commit db9882329b
4 changed files with 19 additions and 25 deletions

View File

@@ -123,10 +123,10 @@ func (h *Handler) HandleWatchPage(w http.ResponseWriter, r *http.Request) {
for i := start; i <= maxCount; i++ {
epStr := strconv.Itoa(i)
meta, err := h.svc.GetEpisodeMetadata(r.Context(), id, epStr)
title := fmt.Sprintf("Episode %d", i)
imgURL := ""
if err == nil && meta != nil {
if info, ok := meta["episodeInfo"].(map[string]any); ok {
if thumbs, ok := info["thumbnails"].([]any); ok && len(thumbs) > 0 {

View File

@@ -35,14 +35,14 @@ type SkipSegment struct {
}
type WatchPageData struct {
MalID int
Title string
CurrentEpisode string
StartTimeSeconds float64
CurrentStatus string
InitialMode string
AvailableModes []string
ModeSources map[string]ModeSource
Segments []SkipSegment
FallbackEpisodes map[string]int
MalID int
Title string
CurrentEpisode string
StartTimeSeconds float64
CurrentStatus string
InitialMode string
AvailableModes []string
ModeSources map[string]ModeSource
Segments []SkipSegment
FallbackEpisodes map[string]int
}