feat(journey): create draft entries from gallery photos

Groups the gallery photos on no entry by local day, then by time gap and
distance, names each group through the geocoder (capped per preview, with
the country or the day as fallback) and writes the groups the traveller
keeps as draft entries with their photos in one transaction. Photos put on
an entry meanwhile or named twice are left out and reported; existing
entries are never touched. REST routes under
/api/journeys/:id/entries/from-photos and the MCP tools
preview_journey_entries_from_photos and create_journey_entries_from_photos
share one service and the journey edit right (#1920).
This commit is contained in:
Maurice
2026-11-30 14:32:40 +01:00
parent ebbd8c5362
commit 9c8a33d400
16 changed files with 2023 additions and 0 deletions
+2
View File
@@ -235,6 +235,8 @@ Requires `journey:read` or `journey:write` scope.
| `move_journey_photos` | Move photos of one entry to another entry of the same journey in one change. `keep_in_source: true` leaves them on the first entry too. A suggestion the photos land on becomes a written entry. |
| `set_journey_photo_caption` | Set or clear (`null`) the caption of one gallery photo. Answers with the caption it replaced under `previous`. |
| `delete_journey_photos` | Delete up to 100 photos or videos of one journey for good: they leave the gallery and every entry. A photo linked from Immich or Synology stays in that library. Every id must belong to the journey, or nothing is deleted. Needs the edit right on the journey. |
| `preview_journey_entries_from_photos` | Group the gallery photos that are on no entry yet and know when they were taken into proposed entries, without writing anything: by local day, then split where two photos are more than `maxGapMinutes` (default 180) or two geotagged ones more than `maxDistanceKm` (default 20) apart. Each group comes with its date, times, middle and country, a suggested title (a place name, else the country, else the day) and its photo ids. Needs edit access to the journey. |
| `create_journey_entries_from_photos` | Write the groups the traveller kept as draft entries with their photos, in one change, with the titles they chose. A photo put on an entry meanwhile, or named twice, is left out and listed in `skippedPhotoIds`; existing entries are never changed. |
| `list_journey_contributors` | List the contributors of a journey (owner and editors/viewers). |
| `add_journey_contributor` | Invite a user to a journey with `editor` or `viewer` role. |
| `update_journey_contributor_role` | Change a contributor's role between `editor` and `viewer`. The owner's own role cannot be changed. |