pull/28462/merge
Mimi 2026-06-03 11:26:48 +02:00 committed by GitHub
commit c8e604f04c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 1 deletions

View File

@ -51,7 +51,8 @@ from
inner join "asset" on "asset"."libraryId" = "library"."id"
left join "asset_exif" on "asset_exif"."assetId" = "asset"."id"
where
"library"."id" = $6
"asset"."deletedAt" is null
and "library"."id" = $6
group by
"library"."id"
select

View File

@ -92,6 +92,7 @@ export class LibraryRepository {
.as('videos'),
)
.select((eb) => eb.fn.coalesce((eb) => eb.fn.sum('asset_exif.fileSizeInByte'), eb.val(0)).as('usage'))
.where('asset.deletedAt', 'is', null)
.groupBy('library.id')
.where('library.id', '=', id)
.executeTakeFirst();