Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat (web/server) 360 degrees Web panoramas #3098

Closed
Closed
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docker/docker-compose.dev.yml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from your PR

Copy link
Contributor Author

@dmitry-brazhenko dmitry-brazhenko Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not to keep it?
Once I started running Immich, it was failing as containers just stopped. Adding this restart;always helped me to get started.

btw, I removed it for now, but I can create a separate PR and merge it there

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ services:
- redis
- database
- typesense
restart: always

immich-machine-learning:
container_name: immich_machine_learning
Expand Down Expand Up @@ -67,6 +68,7 @@ services:
- database
- immich-server
- typesense
restart: always

immich-web:
container_name: immich_web
Expand Down Expand Up @@ -102,6 +104,7 @@ services:
driver: none
volumes:
- tsdata:/data
restart: always

redis:
container_name: immich_redis
Expand All @@ -121,6 +124,7 @@ services:
- pgdata:/var/lib/postgresql/data
ports:
- 5432:5432
restart: always

immich-proxy:
container_name: immich_proxy
Expand Down
4 changes: 2 additions & 2 deletions docs/docs/developer/database-migrations.md
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from your PR

Copy link
Contributor Author

@dmitry-brazhenko dmitry-brazhenko Jul 9, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove it? I fixed the path?
https://github.com/immich-app/immich/tree/main/server/src/infra/entities

btw, I reverted it, but I can create a separate PR and merge it there

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Database Migrations

After making any changes in the `server/src/infra/database/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.
After making any changes in the `server/src/infra/entities`, a database migration need to run in order to register the changes in the database. Follow the steps below to create a new migration.

1. Run the command

Expand All @@ -9,6 +9,6 @@ npm run typeorm:migrations:generate ./src/infra/<migration-name>
```

2. Check if the migration file makes sense.
3. Move the migration file to folder `./src/infra/database/migrations` in your code editor.
3. Move the migration file to folder `./src/infra/migrations` in your code editor.

The server will automatically detect `*.ts` file changes and restart. Part of the server start-up process includes running any new migrations, so it will be applied immediately.
6 changes: 4 additions & 2 deletions mobile/openapi/doc/AssetApi.md

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

1 change: 1 addition & 0 deletions mobile/openapi/doc/AssetResponseDto.md

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

1 change: 1 addition & 0 deletions mobile/openapi/doc/ImportAssetDto.md

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

14 changes: 11 additions & 3 deletions mobile/openapi/lib/api/asset_api.dart

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

14 changes: 11 additions & 3 deletions mobile/openapi/lib/model/asset_response_dto.dart

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

10 changes: 9 additions & 1 deletion mobile/openapi/lib/model/import_asset_dto.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/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ environment:
sdk: '>=2.12.0 <3.0.0'
dependencies:
http: '>=0.13.0 <0.14.0'
intl: '^0.18.0'
intl: '^0.17.0'
alextran1502 marked this conversation as resolved.
Show resolved Hide resolved
meta: '^1.1.8'
dev_dependencies:
test: '>=1.16.0 <1.18.0'
2 changes: 1 addition & 1 deletion mobile/openapi/test/asset_api_test.dart

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

5 changes: 5 additions & 0 deletions mobile/openapi/test/asset_response_dto_test.dart

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

5 changes: 5 additions & 0 deletions mobile/openapi/test/import_asset_dto_test.dart

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

6 changes: 5 additions & 1 deletion server/immich-openapi-specs.json
Original file line number Diff line number Diff line change
Expand Up @@ -4892,6 +4892,9 @@
"checksum": {
"type": "string",
"description": "base64 encoded sha1 hash"
},
"isPanorama": {
"type": "boolean"
}
},
"required": [
Expand All @@ -4911,7 +4914,8 @@
"isArchived",
"mimeType",
"duration",
"checksum"
"checksum",
"isPanorama"
]
},
"AssetTypeEnum": {
Expand Down
5 changes: 2 additions & 3 deletions server/openapi-generator/templates/web/apiInner.mustache
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove this file from your PR

Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,8 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
{{^isArray}}
if ({{paramName}} !== undefined) { {{^multipartFormData}}
localVarFormParams.set('{{baseName}}', {{paramName}} as any);{{/multipartFormData}}{{#multipartFormData}}{{#isPrimitiveType}}
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isEnum}}
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isEnum}}{{^isEnum}}
localVarFormParams.append('{{baseName}}', new Blob([JSON.stringify({{paramName}})], { type: "application/json", }));{{/isEnum}}{{/isPrimitiveType}}{{/multipartFormData}}
localVarFormParams.append('{{baseName}}', {{paramName}} as any);{{/isPrimitiveType}}{{^isPrimitiveType}}
localVarFormParams.append('{{baseName}}', new Blob([JSON.stringify({{paramName}})], { type: "application/json", }));{{/isPrimitiveType}}{{/multipartFormData}}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to double check where this change is coming from

}{{/isArray}}
{{/formParams}}{{/vendorExtensions}}
{{#vendorExtensions}}{{#hasFormParams}}{{^multipartFormData}}
Expand Down
3 changes: 3 additions & 0 deletions server/src/domain/asset/response-dto/asset-response.dto.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export class AssetResponseDto {
people?: PersonResponseDto[];
/**base64 encoded sha1 hash */
checksum!: string;
isPanorama!: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer projectionType field with the enum type

}

export function mapAsset(entity: AssetEntity): AssetResponseDto {
Expand All @@ -58,6 +59,7 @@ export function mapAsset(entity: AssetEntity): AssetResponseDto {
tags: entity.tags?.map(mapTag),
people: entity.faces?.map(mapFace),
checksum: entity.checksum.toString('base64'),
isPanorama: entity.isPanorama,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd prefer projectionType field with the enum type

};
}

Expand Down Expand Up @@ -85,5 +87,6 @@ export function mapAssetWithoutExif(entity: AssetEntity): AssetResponseDto {
tags: entity.tags?.map(mapTag),
people: entity.faces?.map(mapFace),
checksum: entity.checksum.toString('base64'),
isPanorama: entity.isPanorama,
};
}
1 change: 1 addition & 0 deletions server/src/immich/api-v1/asset/asset.core.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export class AssetCore {

type: dto.assetType,
isFavorite: dto.isFavorite,
isPanorama: false,
isArchived: dto.isArchived ?? false,
duration: dto.duration || null,
isVisible: dto.isVisible ?? true,
Expand Down
2 changes: 2 additions & 0 deletions server/src/immich/api-v1/asset/asset.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const _getAsset_1 = () => {
asset_1.fileCreatedAt = new Date('2022-06-19T23:41:36.910Z');
asset_1.updatedAt = new Date('2022-06-19T23:41:36.910Z');
asset_1.isFavorite = false;
asset_1.isPanorama = false;
asset_1.isArchived = false;
asset_1.mimeType = 'image/jpeg';
asset_1.webpPath = '';
Expand All @@ -74,6 +75,7 @@ const _getAsset_2 = () => {
asset_2.fileCreatedAt = new Date('2022-06-19T23:41:36.910Z');
asset_2.updatedAt = new Date('2022-06-19T23:41:36.910Z');
asset_2.isFavorite = false;
asset_2.isPanorama = false;
asset_2.isArchived = false;
asset_2.mimeType = 'image/jpeg';
asset_2.webpPath = '';
Expand Down
Loading