fix: don't process trashed/deleted assets for integrity

This commit is contained in:
izzy
2025-12-02 13:19:37 +00:00
parent 64cc64dd56
commit 6e752bed77

View File

@@ -133,6 +133,7 @@ export class IntegrityRepository {
.selectFrom((eb) =>
eb
.selectFrom('asset')
.where('asset.deletedAt', 'is not', null)
.select(['asset.originalPath as path'])
.select((eb) => [
eb.ref('asset.id').$castTo<string | null>().as('assetId'),
@@ -141,6 +142,7 @@ export class IntegrityRepository {
.unionAll(
eb
.selectFrom('asset')
.where('asset.deletedAt', 'is not', null)
.select((eb) => [
eb.ref('asset.encodedVideoPath').$castTo<string>().as('path'),
eb.ref('asset.id').$castTo<string | null>().as('assetId'),