Feat/journey external picture provider rework (#1632)

* feat(journey): add contextual external photo browser

* fix(Journey) added missing language keys for new Journey feature

* fix(Journey) fixing missing gps requests aswell as added protection against duplicate entries
This commit is contained in:
SimMesg20
2026-07-23 21:35:12 +02:00
committed by GitHub
parent 8855b5581d
commit 4d3d16389e
35 changed files with 618 additions and 44 deletions
@@ -123,7 +123,7 @@ vi.mock('../../src/utils/ssrfGuard', async () => {
json: () => Promise.resolve({
assets: {
items: [
{ id: 'asset-search-1', fileCreatedAt: '2024-06-01T10:00:00.000Z', exifInfo: { city: 'Paris', country: 'France' } },
{ id: 'asset-search-1', fileCreatedAt: '2024-06-01T10:00:00.000Z', exifInfo: { city: 'Paris', country: 'France', latitude: 48.8566, longitude: 2.3522 } },
],
},
}),
@@ -347,8 +347,9 @@ describe('Immich browse and search', () => {
expect(res.status).toBe(200);
expect(Array.isArray(res.body.assets)).toBe(true);
expect(res.body.assets[0]).toMatchObject({ id: 'asset-search-1', city: 'Paris', country: 'France' });
expect(res.body.assets[0]).toMatchObject({ id: 'asset-search-1', city: 'Paris', country: 'France', lat: 48.8566, lng: 2.3522 });
expect(typeof res.body.hasMore).toBe('boolean');
expect(immichState.searchCalls[0]).toMatchObject({ withExif: true });
});
it('IMMICH-043 — POST /search when upstream throws returns 502', async () => {
@@ -977,7 +977,7 @@ describe('Synology searchSynologyPhotos date range', () => {
thumbnail: { cache_key: '201_abc' },
address: { city: 'Kyoto', country: 'Japan', state: 'Kyoto' },
exif: {},
gps: {},
gps: { latitude: 35.0116, longitude: 135.7681 },
resolution: { width: 4000, height: 3000 },
orientation: 1,
description: null,
@@ -997,6 +997,7 @@ describe('Synology searchSynologyPhotos date range', () => {
expect(res.status).toBe(200);
expect(Array.isArray(res.body.assets)).toBe(true);
expect(res.body.assets[0]).toMatchObject({ lat: 35.0116, lng: 135.7681 });
// Verify date parameters were forwarded in the Synology API request body
expect(capturedBody).not.toBeNull();
@@ -1006,6 +1007,9 @@ describe('Synology searchSynologyPhotos date range', () => {
expect(Number(startTime)).toBeGreaterThan(0);
expect(endTime).toBeDefined();
expect(Number(endTime)).toBeGreaterThan(Number(startTime));
const additional = JSON.parse(capturedBody!.get('additional') || '[]') as string[];
expect(additional).toContain('gps');
});
it('SYNO-071 — POST /search without date range omits start_time and end_time', async () => {