mirror of
https://github.com/immich-app/immich.git
synced 2025-08-11 09:16:31 -04:00
fix: exclude assets that haven't been hashed yet from uploads
This commit is contained in:
parent
3e92e837f1
commit
650ad72253
@ -113,6 +113,7 @@ class DriftBackupRepository extends DriftDatabaseRepository {
|
|||||||
final query = _db.localAssetEntity.select()
|
final query = _db.localAssetEntity.select()
|
||||||
..where(
|
..where(
|
||||||
(lae) =>
|
(lae) =>
|
||||||
|
lae.checksum.isNotNull() &
|
||||||
existsQuery(
|
existsQuery(
|
||||||
_db.localAlbumAssetEntity.selectOnly()
|
_db.localAlbumAssetEntity.selectOnly()
|
||||||
..addColumns([_db.localAlbumAssetEntity.assetId])
|
..addColumns([_db.localAlbumAssetEntity.assetId])
|
||||||
@ -125,9 +126,7 @@ class DriftBackupRepository extends DriftDatabaseRepository {
|
|||||||
_db.remoteAssetEntity.selectOnly()
|
_db.remoteAssetEntity.selectOnly()
|
||||||
..addColumns([_db.remoteAssetEntity.checksum])
|
..addColumns([_db.remoteAssetEntity.checksum])
|
||||||
..where(
|
..where(
|
||||||
_db.remoteAssetEntity.checksum.equalsExp(lae.checksum) &
|
_db.remoteAssetEntity.checksum.equalsExp(lae.checksum) & _db.remoteAssetEntity.ownerId.equals(userId),
|
||||||
_db.remoteAssetEntity.ownerId.equals(userId) &
|
|
||||||
lae.checksum.isNotNull(),
|
|
||||||
),
|
),
|
||||||
) &
|
) &
|
||||||
lae.id.isNotInQuery(_getExcludedSubquery()),
|
lae.id.isNotInQuery(_getExcludedSubquery()),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user