fix: ensure segments is never nil in watch page data

This commit is contained in:
2026-05-02 16:47:26 +02:00
committed by Mikkel Elvers
parent 82350740c4
commit efcd34bcb7
2 changed files with 13 additions and 5 deletions

View File

@@ -313,7 +313,7 @@ func (h *Handler) HandleDiscover(w http.ResponseWriter, r *http.Request) {
seen[a.MalID] = true
uniqueTrending = append(uniqueTrending, a)
}
if len(uniqueTrending) >= 10 {
if len(uniqueTrending) >= 8 {
break
}
}
@@ -324,7 +324,7 @@ func (h *Handler) HandleDiscover(w http.ResponseWriter, r *http.Request) {
seen[a.MalID] = true
uniqueUpcoming = append(uniqueUpcoming, a)
}
if len(uniqueUpcoming) >= 10 {
if len(uniqueUpcoming) >= 8 {
break
}
}
@@ -335,7 +335,7 @@ func (h *Handler) HandleDiscover(w http.ResponseWriter, r *http.Request) {
seen[a.MalID] = true
uniqueTop = append(uniqueTop, a)
}
if len(uniqueTop) >= 10 {
if len(uniqueTop) >= 8 {
break
}
}