diff --git a/internal/anime/recommendations.go b/internal/anime/recommendations.go index 9d1ce1fd..09be6fc3 100644 --- a/internal/anime/recommendations.go +++ b/internal/anime/recommendations.go @@ -32,7 +32,11 @@ type topPicksCache struct { const topPicksRefreshTimeout = 30 * time.Second func (s *animeService) GetTopPickForYou(_ context.Context, userID string) (domain.CatalogSectionData, error) { - return s.getCachedTopPicksForYou(userID, recommendations.TopPickLimit), nil + data := s.getCachedTopPicksForYou(userID, recommendations.TopPicksLimit) + if len(data.Animes) > recommendations.TopPickLimit { + data.Animes = data.Animes[:recommendations.TopPickLimit] + } + return data, nil } func (s *animeService) GetTopPicksForYou(_ context.Context, userID string) (domain.CatalogSectionData, error) {