0.2.82
This commit is contained in:
@@ -231,7 +231,18 @@ func (s *Server) decorateHomeRatings(ctx context.Context, out *homeResponse) {
|
||||
}
|
||||
collections = append(collections,
|
||||
out.ContinueWatching, out.NextUp, out.Favorites, out.LatestMovies)
|
||||
s.decorateItems(ctx, collections...)
|
||||
}
|
||||
|
||||
// decorateItems is the one door items leave the gateway through.
|
||||
//
|
||||
// It attaches both of the things Memby knows about a title that Emby's payload does not
|
||||
// carry: the stored review scores, and — for a shadow viewer — whose progress this is. The
|
||||
// two are separate concerns and stayed separate functions, but every call site wanted both,
|
||||
// and a decoration added at seven sites is a decoration missing from the eighth.
|
||||
func (s *Server) decorateItems(ctx context.Context, collections ...[]json.RawMessage) {
|
||||
s.decorateItemRatings(ctx, collections...)
|
||||
s.decorateViewerState(ctx, collections...)
|
||||
}
|
||||
|
||||
// decorateItemRatings rewrites each item in place with whatever the database already
|
||||
@@ -293,7 +304,7 @@ func (s *Server) decorateRowRatings(ctx context.Context, rows []recommend.Row) {
|
||||
for _, row := range rows {
|
||||
collections = append(collections, row.Items)
|
||||
}
|
||||
s.decorateItemRatings(ctx, collections...)
|
||||
s.decorateItems(ctx, collections...)
|
||||
}
|
||||
|
||||
// ratingKeysForItems resolves Emby ids to external titles, preferring the index built by
|
||||
|
||||
Reference in New Issue
Block a user