mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
feat: sync assets, partner assets, exif, and partner exif
Co-authored-by: Zack Pollard <zack@futo.org> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
parent
815de124d4
commit
423a570949
@ -420,8 +420,8 @@ from
|
|||||||
) as "stacked_assets" on "asset_stack"."id" is not null
|
) as "stacked_assets" on "asset_stack"."id" is not null
|
||||||
where
|
where
|
||||||
"assets"."ownerId" = $1::uuid
|
"assets"."ownerId" = $1::uuid
|
||||||
and "isVisible" = $2
|
and "assets"."isVisible" = $2
|
||||||
and "updatedAt" <= $3
|
and "assets"."updatedAt" <= $3
|
||||||
and "assets"."id" > $4
|
and "assets"."id" > $4
|
||||||
order by
|
order by
|
||||||
"assets"."id"
|
"assets"."id"
|
||||||
@ -450,7 +450,7 @@ from
|
|||||||
) as "stacked_assets" on "asset_stack"."id" is not null
|
) as "stacked_assets" on "asset_stack"."id" is not null
|
||||||
where
|
where
|
||||||
"assets"."ownerId" = any ($1::uuid[])
|
"assets"."ownerId" = any ($1::uuid[])
|
||||||
and "isVisible" = $2
|
and "assets"."isVisible" = $2
|
||||||
and "updatedAt" > $3
|
and "assets"."updatedAt" > $3
|
||||||
limit
|
limit
|
||||||
$4
|
$4
|
||||||
|
@ -938,8 +938,8 @@ export class AssetRepository {
|
|||||||
)
|
)
|
||||||
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
|
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
|
||||||
.where('assets.ownerId', '=', asUuid(ownerId))
|
.where('assets.ownerId', '=', asUuid(ownerId))
|
||||||
.where('isVisible', '=', true)
|
.where('assets.isVisible', '=', true)
|
||||||
.where('updatedAt', '<=', updatedUntil)
|
.where('assets.updatedAt', '<=', updatedUntil)
|
||||||
.$if(!!lastId, (qb) => qb.where('assets.id', '>', lastId!))
|
.$if(!!lastId, (qb) => qb.where('assets.id', '>', lastId!))
|
||||||
.orderBy('assets.id')
|
.orderBy('assets.id')
|
||||||
.limit(limit)
|
.limit(limit)
|
||||||
@ -966,8 +966,8 @@ export class AssetRepository {
|
|||||||
)
|
)
|
||||||
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
|
.select((eb) => eb.fn.toJson(eb.table('stacked_assets')).as('stack'))
|
||||||
.where('assets.ownerId', '=', anyUuid(options.userIds))
|
.where('assets.ownerId', '=', anyUuid(options.userIds))
|
||||||
.where('isVisible', '=', true)
|
.where('assets.isVisible', '=', true)
|
||||||
.where('updatedAt', '>', options.updatedAfter)
|
.where('assets.updatedAt', '>', options.updatedAfter)
|
||||||
.limit(options.limit)
|
.limit(options.limit)
|
||||||
.execute() as any as Promise<AssetEntity[]>;
|
.execute() as any as Promise<AssetEntity[]>;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user