fix: identity names now show in all trace tooltips (online + offline)

- Online: remove IDENTITY filter gating on identity_note — always show
- Offline: fix id_names scope bug — was overwritten by top10-only dict
- Both reports now show 'identity: PERSON_xxx' for all 2000 timeline traces
- All 5483 traces have identity mapping (verified in SQLite)
This commit is contained in:
Accusys
2026-05-13 03:19:26 +08:00
parent 8d4d29ce6e
commit fff2af8ad1
2 changed files with 10 additions and 17 deletions

View File

@@ -98,13 +98,6 @@ if IDENTITY is not None:
else:
c.execute("SELECT identity_id, COUNT(*) as fc, COUNT(DISTINCT trace_id) as tc FROM face_detections WHERE identity_id IS NOT NULL GROUP BY identity_id ORDER BY fc DESC LIMIT 10")
top_identities = c.fetchall()
# Get identity names
id_names = {}
if top_identities:
ids = [r[0] for r in top_identities]
placeholders = ",".join(["?" for _ in ids])
c.execute(f"SELECT id, name FROM identities WHERE id IN ({placeholders})", ids)
id_names = {r[0]: r[1] for r in c.fetchall()}
# TKG stats
c.execute("SELECT COUNT(*) FROM tkg_nodes")