Commit Graph

3021 Commits

Author SHA1 Message Date
Fynn Petersen-Frey
56cde0438c
feat(mobile): multiselect for search & person page (#6016)
* feat(mobile): multiselect for search & person page

* merge main

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2024-01-05 21:23:58 +00:00
Thariq Shanavas
ad09896f58
feat(docs): Template script for 3-2-1 backup of the assets and database (#6026)
* Added borg template cron job

* moved script to guides section

* Mentioned db backup location in docs

* Added directions for restoring backups
2024-01-05 15:02:55 -06:00
shenlong
d3af2b1f69
(mobile): ios - calculate hash using CryptoKit (#5976)
* ios: calculate hash using CryptoKit

* chore: remove unused crypto dep

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2024-01-05 10:49:43 -06:00
bo0tzz
ac0cb4a96e
Revert "docs: add step by step set up guide for external libraries (#5288)" (#6194)
This reverts commit 27be076958.
2024-01-05 09:45:50 -06:00
shenlong
af32183728
refactor(mobile): Activities (#5990)
* refactor: autoroutex pushroute

* refactor: autoroutex popRoute

* refactor: autoroutex navigate and replace

* chore: add doc comments for extension methods

* refactor: Add LoggerMixin and refactor Album activities to use mixin

* refactor: Activity page

* chore: activity user from user constructor

* fix: update current asset after build method

* refactor: tests with similar structure as lib

* chore: remove avoid-declaring-call-method rule from dcm analysis

* test: fix proper expect order

* test: activity_statistics_provider_test

* test: activity_provider_test

* test: use proper matchers

* test: activity_text_field_test & dismissible_activity_test added

* test: add http mock to return transparent image

* test: download isar core libs during test

* test: add widget tags to widget test cases

* test: activity_tile_test

* build: currentAlbumProvider to generator

* movie add / remove like to activity input tile

* test: activities_page_test.dart

* chore: better error logs

* chore: dismissibleactivity as statelesswidget

---------

Co-authored-by: shalong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2024-01-04 23:20:55 -06:00
Emanuel Bennici
d1e16025cf
fix(server): Fix incorrect sorting with search (#6031)
The search results are not sorted by date causing confision.

Fixes #5916
2024-01-04 14:47:09 -06:00
Zack Pollard
4cf1e553d2
feat(server): in upload folder, split the files into folders based on the first four of the files uuid (#6175) 2024-01-04 14:45:16 -06:00
shenlong
2aaf941dda
refactor(mobile): use startOAuth and server features flags (#6155)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2024-01-04 14:44:40 -06:00
Alex
13ba83dce6
chore(server): better ML error messages (#5914)
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2024-01-04 21:34:50 +01:00
martin
4f6f79a392
feat(web): go back on the onboarding (#6171)
* feat: go back on the onboarding

* fix: state

* rename variable
2024-01-04 11:20:19 -06:00
Jason Rasmussen
ba4a20a181
chore: group 'dependencies' (#6167) 2024-01-04 11:21:24 -05:00
martin
aefd93e43a
feat(server): add env for reverse geocoding path (#6163)
* feat: add env for reverse geocoding path

* fix: quote in doc
2024-01-04 13:36:52 +00:00
Alex
18f59f78e3
feat(web): onboarding (#6066)
* feat(web): onboarding

* feat: openapi

* feat: modulization

* feat: page advancing

* Animation

* Add storage templaete settings

* sql

* more style

* Theme

* information and styling

* hide/show table

* Styling

* Update user property

* fix test

* fix test:

* fix e2e

* test

* Update web/src/lib/components/onboarding-page/onboarding-hello.svelte

Co-authored-by: bo0tzz <git@bo0tzz.me>

* naming

* use System Metadata

* better return type

* onboarding using server metadata

* revert previous changes in user entity

* sql

* test web

* fix test server

* server/web test

* more test

* consolidate color theme change logic

* consolidate save button to storage template

* merge main

* fix web

---------

Co-authored-by: bo0tzz <git@bo0tzz.me>
2024-01-04 05:28:32 +00:00
Jason Rasmussen
f8d64be13c
feat(server)!: move welcome message to settings (#6157)
* feat(server): move welcome message to settings

* chore: open api
2024-01-04 05:00:17 +00:00
Jason Rasmussen
52e92e9bb4
docs: unused geocoding env variable (#6158) 2024-01-04 04:56:18 +00:00
Jason Rasmussen
7b40c20ea5
chore(server): time bucket sql (#6156) 2024-01-03 22:32:52 -06:00
Jason Rasmussen
317adc5c28
feat(web,server): external domain setting (#6146)
* feat: external domain setting

* chore: open api

* mobile: handle serverconfig-externalDomain

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2024-01-03 21:54:48 -05:00
Jason Rasmussen
1e503c3212
chore(cli): remove chai and unused types (#6153)
* chore: remove chai

* remove more deps
2024-01-03 23:07:02 +00:00
renovate[bot]
282f7803bd
fix(deps): update web (#6152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 23:02:24 +00:00
renovate[bot]
2950d84820
chore(deps): update @immich/cli (#6150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 22:54:13 +00:00
Jonathan Jogenfors
ee82327d2a
add tests for cli exclusion pattern (#6148) 2024-01-03 17:42:26 -05:00
renovate[bot]
13fb32513c
fix(deps): update server (#6119)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 17:41:30 -05:00
renovate[bot]
103c3ee2f1
fix(deps): update docs (#6120)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-03 16:55:59 -05:00
Colin
40fbe81c7b
docs: typo detial -> detail (#6135)
Also added missing "."
2024-01-03 03:34:42 +00:00
renovate[bot]
093e61eee9
chore(deps): update @immich/cli (#6118)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-02 03:35:50 +00:00
renovate[bot]
23b38a0474
fix(deps): update dependency @nestjs/schedule to v4 (#5348)
* fix(deps): update dependency @nestjs/schedule to v4

* fix: change CronJob in addCronJob to match new type required by nestjs schedule module

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Zack Pollard <zackpollard@ymail.com>
2024-01-01 22:25:25 -05:00
jcianci12
27be076958
docs: add step by step set up guide for external libraries (#5288)
* Update libraries.md - External Library step by step set up guide added

When setting up immmich external libraries, I found some missing details around the relationship between external paths and import paths. By providing an example, I am hoping it helps new users.

* chore: fix formatting

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2024-01-01 22:18:28 -05:00
martin
c24d0e82bb
fix: use loading spinner for library spinner (#6116) 2024-01-01 22:10:48 -05:00
Jason Rasmussen
9a04014f98
feat(mobile): use new endpoint (#6108) 2024-01-01 19:02:30 -05:00
Jason Rasmussen
a7d9e25fb0
fix(web): use submit event instead of button click (#6112) 2024-01-01 17:45:09 -05:00
Jason Rasmussen
014adf175a
fix(cli): file handles (#6110)
* fix: file handles

* chore: bump for patch release
2024-01-01 22:37:52 +00:00
Fynn Petersen-Frey
cc7ba3c21a
feat(server): search across own+partner assets (#5966)
* feat(server): search across own+partner assets

* generate sql

* fix sql parameter
2024-01-01 17:25:22 -05:00
Davis Clark
2688e05033
docs: update hardware-transcoding.md (#5968)
* Update hardware-transcoding.md

I accidentally closed #5924 for some odd reason. Copied the same code changes to this one.

* updated formatting

* Update hardware-transcoding.md

Added line 66 saying that `NVIDIA_DRIVER_CAMPABILITITES` is no longer required.
2024-01-01 20:50:03 +00:00
Michael Manganiello
4a5b8c3770
feat(server): Enqueue jobs in bulk (#5974)
* feat(server): Enqueue jobs in bulk

The Job Repository now has a `queueAll` method, that enqueues messages
in bulk (using BullMQ's
[`addBulk`](https://docs.bullmq.io/guide/queues/adding-bulks)),
improving performance when many jobs must be enqueued within the same
operation.

Primary change is in `src/domain/job/job.service.ts`, and other services
have been refactored to use `queueAll` when useful.

As a simple local benchmark, triggering a full thumbnail generation
process over a library of ~1,200 assets and ~350 faces went from
**~600ms** to **~250ms**.

* fix: Review feedback
2024-01-01 15:45:42 -05:00
Jan
7dd88c4114
fix(server): sanitize storagelabel when creating a user #3346 (#5717)
* sanitize storagelabel when creating a user #3346

* code formatting
2024-01-01 15:37:39 -05:00
Michael Lyon
523e7d4742
fix(docs): update broken links (#6094)
* fix(docs): update broken link

* fix(docs): change to path

* fix(docs): second broken link

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2024-01-01 20:32:16 +00:00
Jason Rasmussen
e01c96c637
chore: group svelte major deps (#6104) 2024-01-01 21:27:23 +01:00
renovate[bot]
13390d0c87
chore(deps): update dependency eslint-plugin-unicorn to v50 (#6100)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 19:28:19 +00:00
Opbod
a5a71e6b5c
Update en-US.json - spelling changes (#5868) 2024-01-01 19:27:45 +00:00
renovate[bot]
a53b2de3c4
chore(deps): update dependency @types/supertest to v6 (#6099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 19:27:00 +00:00
renovate[bot]
cb3f18bb9f
chore(deps): update base-image to v20231228 (#6095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 13:44:02 -05:00
renovate[bot]
c80e37aded
chore(deps): update redis:6.2-alpine docker digest to c5a607f (#5979)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 13:18:38 -05:00
Jason Rasmussen
03eb5ffc5c
refactor(server): simplify config init process (#5702) 2024-01-01 13:16:44 -05:00
Jorge Avila
5f6d09d3da
chore(web): migrate to vitest (#5754)
* Updated vite and ts config file with vtest options and a new alias to fix the dev command error

* Updated package script and update the packages
 -- this removes jest dependencies

* Added new setup file needed in vitest in order to be able to use the jest-dom matchers in tests

* Updated deprecated utilities when using faker

* Updated test files and mocks to use vitest instead of jest

* Enabled web test check in GitHub actions

* remove babel dependencies as they are no longer needed with vitest

* move the jest config files to a folder in case we need to go back to jest

* chore: remove old files

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
2024-01-01 12:36:49 -05:00
martin
9de557916b
fix(web): cancel select all (#6047)
* fix: cancel select all

* rename var
2024-01-01 11:18:22 -05:00
martin
0ed89e61ec
fix: remove archived people from explore (#6091) 2024-01-01 11:07:42 -05:00
Zack Pollard
ca9cad20bc
feat: storage template locking + fix for database locks (#6054)
* fix: locks need to be acquired and released using the same session

* feat: only allow a single storage template operation at a single time

this has been added to avoid possible rare race conditions where two files are moved at once to the same path with the same name, causing our duplicate iterator to not detect them and therefore both files will have the same name and overwrite eachother
2023-12-30 09:09:33 -06:00
Zack Pollard
2e38fa73bf
feat: storage template file move hardening (#5917)
* fix: pgvecto.rs extension breaks typeorm schema:drop command

* fix: parse postgres bigints to javascript number types when selecting data

* feat: verify file size is the same as original asset after copying file for storage template job

* feat: allow disabling of storage template job, defaults to disabled for new instances

* fix: don't allow setting concurrency for storage template migration, can cause race conditions above 1

* feat: add checksum verification when file is copied for storage template job

* fix: extract metadata for assets that aren't visible on timeline
2023-12-29 18:41:33 +00:00
Michael Manganiello
5f6bd4ae7e
fix(server): Reduce number of bound parameters in Access queries (#6015)
* fix(server): Reduce number of bound parameters in Access queries

According to https://github.com/typeorm/typeorm/issues/7565, the
introduction of bulk queries for permission checks could quickly reach
the limit of 65536 bound parameters allowed by the PostgreSQL
connection.

To avoid reaching that limit, this first change refactors the Access
queries that are expanding the set of ids multiple times. For example,
`asset.checkSharedLinkAccess` expands the ids 4 times, so providing just
~16400 ids is enough to break the query.

Refactored queries:

* activity.checkCreateAccess

```sql
-- Before
SELECT "AlbumEntity"."id" AS "AlbumEntity_id"
FROM "albums" "AlbumEntity"
    LEFT JOIN "albums_shared_users_users" "AlbumEntity_AlbumEntity__AlbumEntity_sharedUsers"
        ON "AlbumEntity_AlbumEntity__AlbumEntity_sharedUsers"."albumsId"="AlbumEntity"."id"
    LEFT JOIN "users" "AlbumEntity__AlbumEntity_sharedUsers"
        ON "AlbumEntity__AlbumEntity_sharedUsers"."id"="AlbumEntity_AlbumEntity__AlbumEntity_sharedUsers"."usersId"
        AND ("AlbumEntity__AlbumEntity_sharedUsers"."deletedAt" IS NULL)
WHERE
    (
        (
            "AlbumEntity"."id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
            AND "AlbumEntity"."isActivityEnabled" = $11
            AND "AlbumEntity__AlbumEntity_sharedUsers"."id" = $12
        )
        OR (
            "AlbumEntity"."id" IN ($13, $14, $15, $16, $17, $18, $19, $20, $21, $22)
            AND "AlbumEntity"."isActivityEnabled" = $23
            AND "AlbumEntity"."ownerId" = $24
        )
    )
    AND "AlbumEntity"."deletedAt" IS NULL

-- After
SELECT "album"."id" AS "album_id"
FROM "albums" "album"
    LEFT JOIN "albums_shared_users_users" "album_sharedUsers"
        ON "album_sharedUsers"."albumsId"="album"."id"
    LEFT JOIN "users" "sharedUsers"
        ON "sharedUsers"."id"="album_sharedUsers"."usersId"
        AND "sharedUsers"."deletedAt" IS NULL
WHERE
    "album"."id" IN ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10)
    AND "album"."isActivityEnabled" = true
    AND (
        "album"."ownerId" = $11
        OR "sharedUsers"."id" = $12
    )
    AND "album"."deletedAt" IS NULL
```

* asset.checkAlbumAccess

```sql
-- Before
SELECT
    "asset"."id" AS "assetId",
    "asset"."livePhotoVideoId" AS "livePhotoVideoId"
FROM "albums" "album"
    INNER JOIN "albums_assets_assets" "album_asset"
        ON "album_asset"."albumsId"="album"."id"
    INNER JOIN "assets" "asset"
        ON "asset"."id"="album_asset"."assetsId"
        AND "asset"."deletedAt" IS NULL
    LEFT JOIN "albums_shared_users_users" "album_sharedUsers"
        ON "album_sharedUsers"."albumsId"="album"."id"
    LEFT JOIN "users" "sharedUsers"
        ON "sharedUsers"."id"="album_sharedUsers"."usersId"
        AND "sharedUsers"."deletedAt" IS NULL
WHERE
    (
        "album"."ownerId" = $1
        OR "sharedUsers"."id" = $2
    )
    AND (
        "asset"."id" IN ($3, $4, $5, $6, $7, $8, $9, $10, $11, $12)
        OR "asset"."livePhotoVideoId" IN ($13, $14, $15, $16, $17, $18, $19, $20, $21, $22)
    )
    AND "album"."deletedAt" IS NULL

-- After
WITH "assetIds" AS (
    SELECT unnest(array[$1, $2, $3, $4, $5, $6, $7, $8, $9, $10])::uuid AS "id"
    FROM (SELECT 1 AS dummy_column) "dummy_table"
)
SELECT
    "asset"."id" AS "assetId",
    "asset"."livePhotoVideoId" AS "livePhotoVideoId"
FROM "albums" "album"
    INNER JOIN "albums_assets_assets" "album_asset"
        ON "album_asset"."albumsId"="album"."id"
    INNER JOIN "assets" "asset"
        ON "asset"."id"="album_asset"."assetsId"
        AND "asset"."deletedAt" IS NULL
    LEFT JOIN "albums_shared_users_users" "album_sharedUsers"
        ON "album_sharedUsers"."albumsId"="album"."id"
    LEFT JOIN "users" "sharedUsers"
        ON "sharedUsers"."id"="album_sharedUsers"."usersId"
        AND "sharedUsers"."deletedAt" IS NULL
WHERE
    (
        "album"."ownerId" = $11
        OR "sharedUsers"."id" = $12
    )
    AND (
        "asset"."id" IN (SELECT id FROM "assetIds")
        OR "asset"."livePhotoVideoId" IN (SELECT id FROM "assetIds")
    )
    AND "album"."deletedAt" IS NULL
```

* asset.checkSharedLinkAccess

```sql
-- Before
SELECT
    "assets"."id" AS "assetId",
    "assets"."livePhotoVideoId" AS "assetLivePhotoVideoId",
    "albumAssets"."id" AS "albumAssetId",
    "albumAssets"."livePhotoVideoId" AS "albumAssetLivePhotoVideoId"
FROM "shared_links" "sharedLink"
    LEFT JOIN "albums" "album"
        ON "album"."id"="sharedLink"."albumId"
        AND "album"."deletedAt" IS NULL
    LEFT JOIN "shared_link__asset" "assets_sharedLink"
        ON "assets_sharedLink"."sharedLinksId"="sharedLink"."id"
    LEFT JOIN "assets" "assets"
        ON "assets"."id"="assets_sharedLink"."assetsId"
        AND "assets"."deletedAt" IS NULL
    LEFT JOIN "albums_assets_assets" "album_albumAssets"
        ON "album_albumAssets"."albumsId"="album"."id"
    LEFT JOIN "assets" "albumAssets"
        ON "albumAssets"."id"="album_albumAssets"."assetsId"
        AND "albumAssets"."deletedAt" IS NULL
WHERE
    "sharedLink"."id" = $1
    AND (
        "assets"."id" IN ($2, $3, $4, $5, $6, $7, $8, $9, $10, $11)
        OR "albumAssets"."id" IN ($12, $13, $14, $15, $16, $17, $18, $19, $20, $21)
        OR "assets"."livePhotoVideoId" IN ($22, $23, $24, $25, $26, $27, $28, $29, $30, $31)
        OR "albumAssets"."livePhotoVideoId" IN ($32, $33, $34, $35, $36, $37, $38, $39, $40, $41)
    )

-- After
WITH "assetIds" AS (
    SELECT unnest(array[$1, $2, $3, $4, $5, $6, $7, $8, $9, $10])::uuid AS "id"
    FROM (SELECT 1 AS dummy_column) "dummy_table"
)
SELECT
    "assets"."id" AS "assetId",
    "assets"."livePhotoVideoId" AS "assetLivePhotoVideoId",
    "albumAssets"."id" AS "albumAssetId",
    "albumAssets"."livePhotoVideoId" AS "albumAssetLivePhotoVideoId"
FROM "shared_links" "sharedLink"
    LEFT JOIN "albums" "album"
        ON "album"."id"="sharedLink"."albumId"
        AND "album"."deletedAt" IS NULL
    LEFT JOIN "shared_link__asset" "assets_sharedLink"
        ON "assets_sharedLink"."sharedLinksId"="sharedLink"."id"
    LEFT JOIN "assets" "assets"
        ON "assets"."id"="assets_sharedLink"."assetsId"
        AND "assets"."deletedAt" IS NULL
    LEFT JOIN "albums_assets_assets" "album_albumAssets"
        ON "album_albumAssets"."albumsId"="album"."id"
    LEFT JOIN "assets" "albumAssets"
        ON "albumAssets"."id"="album_albumAssets"."assetsId"
        AND "albumAssets"."deletedAt" IS NULL
    WHERE
        "sharedLink"."id" = $11
        AND (
            "assets"."id" IN (SELECT id FROM "assetIds")
            OR "albumAssets"."id" IN (SELECT id FROM "assetIds")
            OR "assets"."livePhotoVideoId" IN (SELECT id FROM "assetIds")
            OR "albumAssets"."livePhotoVideoId" IN (SELECT id FROM "assetIds")
        )
```

* fix: Use array overlapping instead of CTEs
2023-12-27 23:50:54 -06:00
renovate[bot]
4fff2c75aa
chore(deps): update base-image to v20231221 (#6029)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-12-27 23:47:27 -06:00