From 46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 1 Oct 2018 09:41:48 +0200 Subject: Fix redundancy with videos already duplicated with another instance --- server/models/redundancy/video-redundancy.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'server/models/redundancy') diff --git a/server/models/redundancy/video-redundancy.ts b/server/models/redundancy/video-redundancy.ts index 791ba3137..c23a9cc17 100644 --- a/server/models/redundancy/video-redundancy.ts +++ b/server/models/redundancy/video-redundancy.ts @@ -125,9 +125,12 @@ export class VideoRedundancyModel extends Model { return instance.VideoFile.Video.removeFile(instance.VideoFile) } - static loadByFileId (videoFileId: number) { + static async loadLocalByFileId (videoFileId: number) { + const actor = await getServerActor() + const query = { where: { + actorId: actor.id, videoFileId } } -- cgit v1.2.3