Skip to content

Commit

Permalink
feat(web/server): Search by panorama photos (immich-app#3470)
Browse files Browse the repository at this point in the history
* Add panorama filter

* Add generated api changes

* Fix naming
  • Loading branch information
mPyKen authored Jul 31, 2023
1 parent bc3f95c commit 51cfe10
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 18 deletions.
23 changes: 18 additions & 5 deletions cli/src/api/open-api/api.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions mobile/openapi/doc/SearchApi.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 10 additions & 3 deletions mobile/openapi/lib/api/search_api.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion mobile/openapi/test/search_api_test.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions server/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -2924,6 +2924,14 @@
"type": "string"
}
},
{
"name": "exifInfo.projectionType",
"required": false,
"in": "query",
"schema": {
"type": "string"
}
},
{
"name": "smartInfo.objects",
"required": false,
Expand Down
5 changes: 5 additions & 0 deletions server/src/domain/search/dto/search.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ export class SearchDto {
@IsOptional()
'exifInfo.model'?: string;

@IsString()
@IsNotEmpty()
@IsOptional()
'exifInfo.projectionType'?: string;

@IsString({ each: true })
@IsArray()
@IsOptional()
Expand Down
3 changes: 2 additions & 1 deletion server/src/infra/typesense-schemas/asset.schema.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CollectionCreateSchema } from 'typesense/lib/Typesense/Collections';

export const assetSchemaVersion = 7;
export const assetSchemaVersion = 8;
export const assetSchema: CollectionCreateSchema = {
name: `assets-v${assetSchemaVersion}`,
fields: [
Expand All @@ -23,6 +23,7 @@ export const assetSchema: CollectionCreateSchema = {
{ name: 'exifInfo.make', type: 'string', facet: true, optional: true },
{ name: 'exifInfo.model', type: 'string', facet: true, optional: true },
{ name: 'exifInfo.orientation', type: 'string', optional: true },
{ name: 'exifInfo.projectionType', type: 'string', facet: true, optional: true },

// smart info
{ name: 'smartInfo.objects', type: 'string[]', facet: true, optional: true },
Expand Down
Loading

0 comments on commit 51cfe10

Please sign in to comment.