Commit graph

12 commits

Author SHA1 Message Date
Peter Ombodi
3eb2bf0342 optimize, refactor code
remove redundant code and checking
getTrashedAssetsForAlbum for iOS
tests for hash trashed assets
2025-10-06 11:41:34 +03:00
Peter Ombodi
bec1b30554 trashed_local_asset table mirror of local_asset table structure
trashed_local_asset<->local_asset transfer data on move to trash or restore
refactor code
2025-09-24 16:58:56 +03:00
Peter Ombodi
55fe480cc1 Include trashed items in getMediaChanges
Process trashed items delta during incremental sync
2025-09-19 17:55:20 +03:00
Peter Ombodi
42f99e8039 resolve merge conflicts
use updated approach for calculating checksums
2025-09-18 17:27:35 +03:00
Peter Ombodi
bd9e4871ec Merge remote-tracking branch 'origin/main' into feature/sync_assets_trashed_state
# Conflicts:
#	mobile/android/app/src/main/kotlin/app/alextran/immich/sync/Messages.g.kt
#	mobile/ios/Runner/Sync/Messages.g.swift
#	mobile/lib/domain/services/hash.service.dart
#	mobile/lib/domain/services/local_sync.service.dart
#	mobile/lib/platform/native_sync_api.g.dart
#	mobile/lib/providers/infrastructure/sync.provider.dart
#	mobile/pigeon/native_sync_api.dart
#	mobile/test/domain/services/hash_service_test.dart
2025-09-18 14:07:13 +03:00
Peter Ombodi
f7e5288173 rework trashed assets handling
- add new table trashed_local_asset
- mirror trashed assets data in trashed_local_asset.
- compute checksums for assets trashed out-of-app.
- restore assets present in trashed_local_asset and non-trashed in remote_asset.
- simplify moving-to-trash logic based on remote_asset events.
2025-09-18 13:55:56 +03: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
shenlong
268b411a6f
fix: sync is_favorite from native (#20412)
* feat: sync is_favorite from native

* handle favorite during upload

* Update mobile/ios/Runner/Sync/MessagesImpl.swift

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

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-07-29 21:57:04 -05:00
shenlong
dfe6d27bbd
feat: sqlite video player (#19792)
* feat: video player

* use remote asset id in local query

* fix: error from pre-caching beyond total assets

* fix: flipped local videos

* incorrect aspect ratio on iOS

* ignore other storage id during equals check

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-07-09 09:34:25 -05:00
shenlong
75c24f0023
feat(mobile): sync local asset width & height from platform (#18994)
* add width and height to sqlite entities

* sync width & height from platform

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
2025-06-08 21:50:54 -05:00
shenlong
ce6631f7e0
feat(mobile): hash assets in isolate (#18924) 2025-06-06 11:23:05 +05:30
shenlong
dbdb64f6c5
feat: delta sync (#18428)
* feat: delta sync

* fix: ignore iCloud assets

* feat: dev logs

* add full sync button

* remove photo_manager dep for sync

* misc logs and fix

* add time taken to DLog

* fix: build release iOS

* ios sync go brrr

* rename local sync service

* update isar fork

* rename to platform assets / albums

* fix ci check

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
Co-authored-by: Alex <alex.tran1502@gmail.com>
2025-05-29 10:42:00 -05:00