This commit is contained in:
Manav Rathi
2024-08-14 14:20:23 +05:30
parent 4e1d80380c
commit bb56fddd45
2 changed files with 10 additions and 3 deletions

View File

@@ -424,8 +424,6 @@ async function getAllPeople(limit: number = undefined) {
await syncPersons();
const people = await persons();
log.debug(() => ["people", { people }]);
return [];
}
let people: Array<SearchPerson> = []; // await mlIDbStorage.getAllPeople();

View File

@@ -341,7 +341,16 @@ export const wipCluster = async () => {
const result: SearchPerson[] = [];
for (const person of people) {
const avatarFaceID = person.avatarFaceID;
let avatarFaceID = person.avatarFaceID;
// TODO-Cluster
// Temp
if (!avatarFaceID) {
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
avatarFaceID = person.clusterIDs
.map((id) => clusterByID.get(id))
.flatMap((cluster) => cluster?.faceIDs ?? [])[0]!;
}
person.clusterIDs;
const avatarFaceFileID = fileIDFromFaceID(avatarFaceID);
const avatarFaceFile = localFilesByID.get(avatarFaceFileID ?? 0);
if (!avatarFaceFileID || !avatarFaceFile) {