diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/models/video/video.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/server/models/video/video.ts b/server/models/video/video.ts index 3a3cfbe85..33d62926b 100644 --- a/server/models/video/video.ts +++ b/server/models/video/video.ts | |||
@@ -215,8 +215,8 @@ type AvailableForListOptions = { | |||
215 | 'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' + | 215 | 'INNER JOIN "videoChannel" ON "videoChannel"."id" = "video"."channelId" ' + |
216 | 'INNER JOIN "account" ON "account"."id" = "videoChannel"."accountId" ' + | 216 | 'INNER JOIN "account" ON "account"."id" = "videoChannel"."accountId" ' + |
217 | 'INNER JOIN "actor" ON "account"."actorId" = "actor"."id" ' + | 217 | 'INNER JOIN "actor" ON "account"."actorId" = "actor"."id" ' + |
218 | 'WHERE "actor"."serverId" IS NULL OR ' + | 218 | 'LEFT JOIN "actorFollow" ON "actorFollow"."targetActorId" = "actor"."id" ' + |
219 | '"actor"."id" IN (SELECT "targetActorId" FROM "actorFollow" WHERE "actorId" = 1)' + // Subquery for optimization | 219 | 'WHERE "actor"."serverId" IS NULL OR "actorFollow"."actorId" = ' + actorIdNumber + |
220 | ')' | 220 | ')' |
221 | ) | 221 | ) |
222 | }, | 222 | }, |
@@ -632,7 +632,7 @@ export class VideoModel extends Model<VideoModel> { | |||
632 | // Do not wait video deletion because we could be in a transaction | 632 | // Do not wait video deletion because we could be in a transaction |
633 | Promise.all(tasks) | 633 | Promise.all(tasks) |
634 | .catch(err => { | 634 | .catch(err => { |
635 | logger.error('Some errors when removing files of video %s in after destroy hook.', instance.uuid, { err }) | 635 | logger.error('Some errors when removing files of video %s in before destroy hook.', instance.uuid, { err }) |
636 | }) | 636 | }) |
637 | 637 | ||
638 | return undefined | 638 | return undefined |