Big changes
This commit is contained in:
@@ -138,6 +138,21 @@ func (s *Store) LibraryCandidates(ctx context.Context, genres []string, limit in
|
||||
return collectPayloads(rows)
|
||||
}
|
||||
|
||||
// AllRecommendationCandidates returns the complete Movie/Series catalogue for an
|
||||
// offline For You rebuild. The resulting per-user pool is deliberately over-provisioned
|
||||
// so a short runtime filter still has enough ranked titles to fill the TV row.
|
||||
func (s *Store) AllRecommendationCandidates(ctx context.Context) ([]json.RawMessage, error) {
|
||||
rows, err := s.pool.Query(ctx, `
|
||||
SELECT payload
|
||||
FROM library_items
|
||||
WHERE type IN ('Movie', 'Series')
|
||||
ORDER BY community_rating DESC NULLS LAST, date_created DESC NULLS LAST`)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("store: all recommendation candidates: %w", err)
|
||||
}
|
||||
return collectPayloads(rows)
|
||||
}
|
||||
|
||||
// CuratedCandidates filters the imported catalogue for a server-authored shelf. Arrays
|
||||
// are matched case-insensitively because Emby studio capitalisation is not consistent.
|
||||
func (s *Store) CuratedCandidates(
|
||||
|
||||
Reference in New Issue
Block a user