148 Commits

Author SHA1 Message Date
Kang
02b29046b3
feat: ocr (#18836)
* feat: add OCR functionality and related configurations

* chore: update labeler configuration for machine learning files

* feat(i18n): enhance OCR model descriptions and add orientation classification and unwarping features

* chore: update Dockerfile to include ccache for improved build performance

* feat(ocr): enhance OCR model configuration with orientation classification and unwarping options, update PaddleOCR integration, and improve response structure

* refactor(ocr): remove OCR_CLEANUP job from enum and type definitions

* refactor(ocr): remove obsolete OCR entity and migration files, and update asset job status and schema to accommodate new OCR table structure

* refactor(ocr): update OCR schema and response structure to use individual coordinates instead of bounding box, and adjust related service and repository files

* feat: enhance OCR configuration and functionality

- Updated OCR settings to include minimum detection box score, minimum detection score, and minimum recognition score.
- Refactored PaddleOCRecognizer to utilize new scoring parameters.
- Introduced new database tables for asset OCR data and search functionality.
- Modified related services and repositories to support the new OCR features.
- Updated translations for improved clarity in settings UI.

* sql changes

* use rapidocr

* change dto

* update web

* update lock

* update api

* store positions as normalized floats

* match column order in db

* update admin ui settings descriptions

fix max resolution key

set min threshold to 0.1

fix bind

* apply config correctly, adjust defaults

* unnecessary model type

* unnecessary sources

* fix(ocr): switch RapidOCR lang type from LangDet to LangRec

* fix(ocr): expose lang_type (LangRec.CH) and font_path on OcrOptions for RapidOCR

* fix(ocr): make OCR text search case- and accent-insensitive using ILIKE + unaccent

* fix(ocr): add OCR search fields

* fix: Add OCR database migration and update ML prediction logic.

* trigrams are already case insensitive

* add tests

* format

* update migrations

* wrong uuid function

* linting

* maybe fix medium tests

* formatting

* fix weblate check

* openapi

* sql

* minor fixes

* maybe fix medium tests part 2

* passing medium tests

* format web

* readd sql

* format dart

* disabled in e2e

* chore: translation ordering

---------

Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2025-10-27 14:09:55 +00:00
Brandon Wees
b484a52252
chore: refactor show view in timeline button (#22894)
* chore: refactor show view in timeline button

This refactor includes changes to notify asset viewer about where an asset was shown from.

* chore: realized I could just pull from the timelineProvider instead of storing it in the asset viewer state

* chore: rename enum to TimelineOrigin and update members

* fix: update isOwner condition

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-10-14 15:25:48 +00:00
Brandon Wees
8473dab684
fix: shared album control permissions (#22435)
* fix: shared album control permissions

* fix: properly display "add photos"

* fix: dont allow modification of album order

* fix: album title/description edit from app bar

* chore: code review changes

* chore: format translations

* chore: lintings
2025-10-14 08:04:22 +05:30
shenlong
63c2f4415b
chore: use hosted isar flutter libs (#22757)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-10-08 04:19:46 -05:00
shenlong
60b1faac0f
chore: clean auth-user entity on reset (#22583)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-10-02 22:48:17 -05:00
Alex
ca8a6e5f95
fix: show activity in shared albunm (#22589) 2025-10-02 11:25:40 -05:00
shenlong
a2b25b7a74
fix: show only owned assets in places and map (#22585)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-10-02 10:41:14 -05:00
shenlong
8f1bc7e821
fix: show un-hashed remainder assets (#22492)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-30 08:19:03 -05:00
shenlong
ee3c07d049
fix: process upload only after successful remote sync (#22360)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-29 10:10:00 -05:00
shenlong
fea5e6783c
fix: merged timeline orderby localtime (#22371)
* chore: refactor dateFmt to truncateDate

* fix: merged timeline orderby localtime

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-29 09:53:40 -05:00
shenlong
7d8cd05bc2
fix: remote album timeline filter (#22423)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-26 17:35:46 +00:00
Mert
5116b215a2
fix(mobile): load local thumbnails in album timeline (#22329)
* join local asset in album query

* missed one

* formatting
2025-09-26 00:38:19 +05:30
Alex
7a0107fc79
feat: show preparing/hashing status in backup page (#22222)
* only show preparing information while hashing

* pr feedback

* use count

* use a single query for count

* use Mert's query
2025-09-21 14:34:19 -05:00
Jason Rasmussen
86df09a0e4
fix(mobile): smaller search page size (#22210) 2025-09-19 10:11:11 -04:00
shenlong
e1e24f3d60
fix: sqlite parameters limit (#22119)
* fix isNotIns

* fix isIns

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-19 09:47:56 -04:00
Mert
9ae42106cc
fix(mobile): stack row blocking gestures and not showing up (#21854) 2025-09-18 06:16:14 +00:00
shenlong
532ec10d5f
refactor: hashing service (#21997)
* download only backup selected assets

* android impl

* fix tests

* limit concurrent hashing to 16

* extension cleanup

* optimized hashing

* hash only selected albums

* remove concurrency limit

* address review comments

* log more info on failure

* add native cancellation

* small batch size on ios, large on android

* fix: get correct resources

* cleanup getResource

* ios better hash cancellation

* handle graceful cancellation android

* do not trigger multiple hashing ops

* ios: fix circular reference, improve cancellation

* kotlin: more cancellation checks

* no need to create result

* cancel previous task

* avoid race condition

* ensure cancellation gets called

* fix cancellation not happening

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: mertalev <101130780+mertalev@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-09-17 23:42:37 -05:00
Mert
b79a2eb6b9
chore(mobile): const platform checks (#21878)
* use `defaultTargetPlatform`

* extension

* formatting
2025-09-15 11:13:39 -04:00
shenlong
dcee34095b
fix: reset sqlite on beta migration (#20735)
reset sync stream on migration

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-14 16:30:25 -05:00
Alex
0166e99d90
chore: remove main timeline query watch throttle (#21942) 2025-09-14 02:09:07 -05:00
shenlong
7893ac25fb
fix: always use en locale for parsing timeline datetime (#21796)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-11 14:20:39 -05:00
shenlong
67a8cab286
feat: resurrect advanced info (#21633)
* feat: resurrect advanced info

* display null values as well

* add exif details

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-10 08:38:53 -05:00
Alex
59accbf32a
fix: prevent isolate deadlock (#21692) 2025-09-08 19:18:13 +00:00
shenlong
059a0e8aa8
feat: sync AuthUserV1 (#21565)
* feat: sync AuthUserV1

* migration

* chore: fix analyze

* fix user updatedAt check

* fix: auth user sync query

* generate sql

* bump schema version and update migration

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Jason Rasmussen <jason@rasm.me>
Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
2025-09-08 14:00:10 -05:00
shenlong
fd4c2acde8
feat: handle SyncResetV1 (#20732)
* feat: handle SyncResetV1

* auto retry on reset and handle SyncCompleteV1

* fix tests

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-09-08 09:48:26 -05:00
Alex
bcfb5bee1f
feat: album info sync (#21103)
* wip

* album creation

* fix: album api repository no invalidating after logging out

* add linkedRemoteAlbumId column and migration

* link/unlink remote album

* logic to find and add new assets to album

* pr feedback

* add toggle option to backup option page

* refactor: provider > service

* rename

* Handle page pop manually

* UI feedback for user creation and sync linked album

* uncomment migration

* remove unused method
2025-09-04 18:44:10 +00:00
shenlong
674faf2e57
fix: local sync task never runs on iOS (#21491)
* fix: local sync task never runs on iOS

* chore: rename ios register method

* refactor from using dart callback to dart entrypoint + more logs

* check if file exists before hashing

* reschedule local sync task

* chore: rename background worker logger

* refactor: move file exists check inside repo

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-09-03 02:05:58 +05:30
Mert
303307e1ac
fix(mobile): memory lane query (#21422) 2025-08-29 19:33:58 -05:00
Mert
a5841a8bf4
fix(mobile): memory lane rebuild (#21350)
* avoid unnecessary timeline rebuild

* add key

* handle disabled memories

* avoid rebuild if no memories
2025-08-27 21:16:41 -05:00
Yaros
204299d500
fix(mobile): user storage quota not showing (#21263) 2025-08-26 15:34:19 -05:00
Mert
e67265cef2
fix(mobile): caching thumbnails to disk (#21275) 2025-08-26 11:49:12 -04:00
Alex
3138048b96
fix: cannot load thumbnail from unknown content length (#21192)
* fix: cannot load thumbnail from unknown content length

* pr feedback

* pr feedback
2025-08-23 15:25:12 -05:00
shenlong
2be1a58c5b
fix: prefer local video if available (#21119)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-23 11:18:57 -05:00
Alex
13c8a6e61d
fix: parse correct metadata to userDto for SQlite store implmentation (#21154) 2025-08-23 11:02:24 -05:00
Alex
01edf6533b
fix: shared album asset count query (#21157) 2025-08-23 10:46:40 -05:00
shenlong
6f4f79d8cc
feat: migrate store to sqlite (#21078)
* add store entity and migration

* make store service take both isar and drift repos

* migrate and switch store on beta timeline state change

* chore: make drift variables final

* dispose old store before switching repos

* use store to update values for beta timeline

* change log service to use the proper store

* migrate store when beta already enabled

* use isar repository to check beta timeline in store service

* remove unused update method from store repo

* dispose after create

* change watchAll signature in store repo

* fix test

* rename init isar to initDB

* request user to close and reopen on beta migration

* fix tests

* handle empty version in migration

* wait for cache to be populated after migration

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-21 14:58:50 -05:00
shenlong
ed3997d844
fix: skip albums selected or excluded from backups from deletions (#21116)
* skip albums selected or excluded from backups from deletions

* filter empty local albums from library page

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-08-21 13:44:07 -05:00
Mert
fb59fa343d
feat(mobile): optimized thumbnail widget (#21073)
* thumbnail widget

* use animation ticker, improvements

* use static thumbnail resolution for now

* fix android sample size

* free memory sooner

* formatting

* tweaks

* wait for disposal

* remove debug prints

* take two on animation

* fix

* remote constructor

* missed one

* unused imports

* unnecessary import

* formatting
2025-08-21 18:06:02 +00:00
Alex
ab2849781a
feat: show remainder assets info (#21114)
* feat: show remainder assets info

* pr feedback
2025-08-21 17:18:31 +00:00
Mert
99d6673503
feat(mobile): platform image providers (#20927)
* platform image providers

* use key

* fix cache manager

* more logs, cancel on dispose instead

* split into separate files

* fix saving to cache

* cancel multi-stage provider

* refactored `getInitialImage`

* only wait for disposal for full images

* cached image works

* formatting

* lower asset viewer ram usage

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-20 19:36:44 +00:00
Aaron Tulino
a8b4a5e856
fix(mobile): sort local album by most recently modified (#21038)
Sort with SQL instead

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-19 02:13:40 +00:00
Aaron Tulino
257b0c74af
fix(mobile): show most recent image in album as thumbnail (#21037)
Show most recent image in album as thumbnail
Fixes #21004
2025-08-18 18:02:18 -05:00
Alex
1a4eab9655
fix: locked photos shown in beta timeline favorite page (#20937) 2025-08-14 23:03:33 +00:00
Brandon Wees
1926c90780
feat(mobile): shared album activities (#20714)
* feat(mobile): shared album activities

* add like buttons and fix behavior of unliking

* fix: conditionally show activity button and fix title truncations

* fix(mobile): newest/oldest album sort (#20743)

* fix(mobile): newest/oldest album sort

* chore: use sqlite to determine album asset timestamps

* Fix missing future

Co-authored-by: Alex <alex.tran1502@gmail.com>

* fix: async handling of sort

* chore: tests

* chore: code review changes

* fix: use created at for newest asset

* fix: use localDateTime for sorting

* chore: cleanup

* chore: use final

* feat: loading indicator

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-14 22:50:56 +00:00
Brandon Wees
0d60199514
fix(mobile): newest/oldest album sort (#20743)
* fix(mobile): newest/oldest album sort

* chore: use sqlite to determine album asset timestamps

* Fix missing future

Co-authored-by: Alex <alex.tran1502@gmail.com>

* fix: async handling of sort

* chore: tests

* chore: code review changes

* fix: use created at for newest asset

* fix: use localDateTime for sorting

* chore: cleanup

* chore: use final

* feat: loading indicator

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-12 14:46:50 -05:00
shenlong
f1c494ef97
fix: use create if not exists clause for indexes (#20728)
Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-08-06 16:57:33 -05:00
Brandon Wees
3cd7f5ab90
feat: use sqlite for logging (#20414)
* feat: use drift for logging

* fix: tests

* feat: use the truncate limit from constants.ts as default

* chore: move setupAll to top level and restructure

* chore: code review changes

* fix: inherits

* feat: raise log line limit to 2000

* limit getAll to 250 lines

* delete DLog and make LogRepository not a singleton

* fix: drift build settings and `make migration`

* fix: tests

* remove sensitive log

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-06 10:49:29 -05:00
Mert
0121043d7d
refactor(mobile): sqlite-based map view (#20665)
* feat(mobile): drift map page

* refactor: map query

* perf: do not filter markers

* fix: refresh timeline by key

* chore: rename

* remove ref listen and global key

* clean code

* remove locked and favorite

* temporary change for stress test

* optimizations

* fix bottom sheet

* cleaner bounds check

* cleanup

* feat: back button

---------

Co-authored-by: wuzihao051119 <wuzihao051119@outlook.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-08-06 10:05:49 -05:00
Brandon Wees
4179c8a17d
fix(mobile): filter people that have less than 3 faces (#20705) 2025-08-05 21:16:13 +00:00
Zack Pollard
02381343ff
fix: album asset sync must sync new assets in a shared album (#20655) 2025-08-05 17:53:51 +01:00