diff options
author | Chocobozzz <me@florianbigard.com> | 2018-10-01 09:41:48 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-10-01 09:41:48 +0200 |
commit | 46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b (patch) | |
tree | 8b06bd5f60d464723769fb53fe4f96558f3bfa74 /server/models | |
parent | 8b917537af2217ad0c87d49fd2ffa693d46a499c (diff) | |
download | PeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.tar.gz PeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.tar.zst PeerTube-46f8d69b4e58a3006c32b2e0d97b9262fd30fd6b.zip |
Fix redundancy with videos already duplicated with another instance
Diffstat (limited to 'server/models')
-rw-r--r-- | server/models/redundancy/video-redundancy.ts | 5 |
1 files changed, 4 insertions, 1 deletions
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<VideoRedundancyModel> { | |||
125 | return instance.VideoFile.Video.removeFile(instance.VideoFile) | 125 | return instance.VideoFile.Video.removeFile(instance.VideoFile) |
126 | } | 126 | } |
127 | 127 | ||
128 | static loadByFileId (videoFileId: number) { | 128 | static async loadLocalByFileId (videoFileId: number) { |
129 | const actor = await getServerActor() | ||
130 | |||
129 | const query = { | 131 | const query = { |
130 | where: { | 132 | where: { |
133 | actorId: actor.id, | ||
131 | videoFileId | 134 | videoFileId |
132 | } | 135 | } |
133 | } | 136 | } |