Expand description
Album suggestion detection service.
Analyses photo metadata (location, time, faces) to propose trip and event albums that the user can accept, dismiss, or ignore.
Structs§
- Detected
Suggestion - A detected suggestion before persistence.
- Suggestion
Diagnostics
Functions§
- compute_
fingerprint - Compute a stable fingerprint from a sorted set of photo IDs. Uses std DefaultHasher for speed (no crypto needed).
- detect_
events - Detect event suggestions via a 4-hour sliding window. An event is a burst of >= 8 photos separated by <= 4 hours from their neighbours, with a signal check (faces or single-location).
- detect_
gatherings - A “gathering” is a 1–2 day window with ≥ 8 photos that contain at least 2 distinct named-or-unnamed face clusters. The intent is to catch family weekends, parties, and outings on libraries that have no location metadata at all (old phones, scanned DSLR exports).
- detect_
home_ city - Determine the user’s “home city” — the city with the most distinct photo-weeks. Returns (city, country, centroid_lat, centroid_lng) or None.
- detect_
suggestions - Run the full suggestion detection pipeline: trips then events. Newly detected suggestions that don’t match existing fingerprints are persisted to the database.
- detect_
suggestions_ with_ diagnostics - detect_
suggestions_ with_ diagnostics_ cancel - detect_
trips - Detect complete journeys rather than independent city visits.
- haversine_
km - Haversine distance in kilometres between two lat/lng pairs.
- pick_
cover - Pick the best cover photo from a list of IDs. User favourites and the existing duplicate/burst quality ranking lead; faces and landscape framing break ties.