perf: batch label stats query + fix scoped thumb
This commit is contained in:
@@ -713,7 +713,9 @@ export async function listLabels(): Promise<PpLabel[]> {
|
||||
const { data } = await sidecar.get<PpLabel[]>('/api/sidecar/labels', {
|
||||
params: { count: 1000, order: 'count', all: true, perPage: 1000 }
|
||||
});
|
||||
return filterByUserPhotos(data, (l) => `label:${l.Slug}`);
|
||||
// Sidecar already filters to the user's scope and sets correct counts +
|
||||
// thumbs in one DB query — no need to probe each label individually.
|
||||
return data;
|
||||
}
|
||||
|
||||
// ── Subjects (people / face recognition) ────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user