* fix(server): stack info in asset response for mobile
* fix(server): getAllAssets - do not filter by stack ID
* tet(server): GET /assets stack e2e
* chore(server): fix checks
* stack asset height
---------
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
* basic changes
update version check
set ef_search for clip
* pgvector compatibility
Revert "pgvector compatibility"
This reverts commit 2b66a52aa4097dd27da58138c5288fd87cb9b24a.
pgvector compatibility: minimal edition
pgvector startup check
* update extension at startup
* wording
shortened vector extension variable name
* nightly docker
* fixed version checks
* update tests
add tests for updating extension
remove unnecessary check
* simplify `getRuntimeConfig`
* wording
* reindex on minor version update
* 0.2 upgrade testing
update prod compose
* acquire lock for init
* wip vector down on shutdown
* use upgrade helper
* update image tag
* refine restart check
check error message
* test reindex
testing
upstream fix
formatting
fixed reindexing
* use enum in signature
* fix tests
remove unused code
* add reindexing tests
* update to official 0.2
remove alpha from version name
* add warning test if restart required
* update test image to 0.2.0
* linting and test cleanup
* formatting
* update sql
* wording
* handle setting search path for new and existing databases
* handle new db in reindex check
* fix post-update reindexing
* get dim size
* formatting
* use vbase
* handle different db name
* update sql
* linting
* fix suggested env
* feat: search peoples
* fix: responsive design
* use existing count
* generate sql file
* fix: tests
* remove visible people
* fix: merge, hide...
* use component
* fix: linter
* chore: regenerate api
* fix: change name when searching for a face
* save search
* remove duplicate
* use enums for query parameters
* fix: increase to 20 for the local search
* use constants
* simplify
* fix: number of people more visible
* fix: merge
* fix: search
* fix: loading spinner position
* pr feedback
* Fix extraction of samsung motionphoto videos
* Refactor binary tag extraction to the repository to consolidate exiftool usage
* format
* fix linting and swap argument orders
* Fix tag name and conditional order
* Add unit test
* Update server test assets submodule
* Remove old motion photo video assets when a new one is extracted
* delete first, then write
* Include motion photo asset uuid's in the filename
If the filenames are not uniquified, then we can't delete old/corrupt ones
* Fix formatting and fix/add tests
* chore: only use new uuid
---------
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Fixes https://github.com/immich-app/immich/issues/5982.
There are basically three options:
1. Search `originalFileName` by dropping a file extension from the query
(if present). Lower fidelity but very easy - just a standard index &
equality.
2. Search `originalPath` by adding an index on `reverse(originalPath)`
and using `starts_with(reverse(query) + "/", reverse(originalPath)`. A
weird index & query but high fidelity.
3. Add a new generated column called `originalFileNameWithExtension` or
something. More storage, kinda jank.
TBH, I think (1) is good enough and easy to make better in the future.
For example, if I search "DSC_4242.jpg", I don't really think it matters
if "DSC_4242.mov" also shows up.
edit: There's a fourth approach that we discussed a bit in Discord and
decided we could switch to it in the future: using a GIN. The minor
issue is that Postgres doesn't tokenize paths in a useful (they're a
single token and it won't match against partial components). We can
solve that by tokenizing it ourselves. For example:
```
immich=# with vecs as (select to_tsvector('simple', array_to_string(string_to_array('upload/library/sushain/2015/2015-08-09/IMG_275.JPG', '/'), ' ')) as vec) select * from vecs where vec @@ phraseto_tsquery('simple', array_to_string(string_to_array('library/sushain', '/'), ' '));
vec
-------------------------------------------------------------------------------
'-08':6 '-09':7 '2015':4,5 'img_275.jpg':8 'library':2 'sushain':3 'upload':1
(1 row)
```
The query is also tokenized with the 'split-by-slash-join-with-space'
strategy. This strategy results in `IMG_275.JPG`, `2015`, `sushain` and
`library/sushain` matching. But, `08` and `IMG_275` do not match. The
former is because the token is `-08` and the latter because the
`img_275.jpg` token is matched against exactly.
* Added read-only flag for assets, endpoint to trigger file import vs upload
* updated fixtures with new property
* if upload is 'read-only', ensure there is no existing asset at the designated originalPath
* added test for file import as well as detecting existing image at read-only destination location
* Added storage service test for a case where it should not move read-only assets
* upload doesn't need the read-only flag available, just importing
* default isReadOnly on import endpoint to true
* formatting fixes
* create-asset dto needs isReadOnly, so set it to false by default on create, updated api generation
* updated code to reflect changes in MR
* fixed read stream promise return type
* new index for originalPath, check for existing path on import, reglardless of user, to prevent duplicates
* refactor: import asset
* chore: open api
* chore: tests
* Added externalPath support for individual users, updated UI to allow this to be set by admin
* added missing var for externalPath in ui
* chore: open api
* fix: compilation issues
* fix: server test
* built api, fixed user-response dto to include externalPath
* reverted accidental commit
* bad commit of duplicate externalPath in user response dto
* fixed tests to include externalPath on expected result
* fix: unit tests
* centralized supported filetypes, perform file type checking of asset and sidecar during file import process
* centralized supported filetype check method to keep regex DRY
* fixed typo
* combined migrations into one
* update api
* Removed externalPath from shared-link code, added column to admin user page whether external paths / import is enabled or not
* update mimetype
* Fixed detect correct mimetype
* revert asset-upload config
* reverted domain.constant
* refactor
* fix mime-type issue
* fix format
---------
Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>