diff options
Diffstat (limited to 'server/models/video')
-rw-r--r-- | server/models/video/sql/video/shared/video-model-builder.ts | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/models/video/sql/video/shared/video-model-builder.ts b/server/models/video/sql/video/shared/video-model-builder.ts index b1b47b721..166ff9d31 100644 --- a/server/models/video/sql/video/shared/video-model-builder.ts +++ b/server/models/video/sql/video/shared/video-model-builder.ts | |||
@@ -234,15 +234,17 @@ export class VideoModelBuilder { | |||
234 | } | 234 | } |
235 | 235 | ||
236 | private addActorAvatar (row: SQLRow, actorPrefix: string, actor: ActorModel) { | 236 | private addActorAvatar (row: SQLRow, actorPrefix: string, actor: ActorModel) { |
237 | const avatarPrefix = `${actorPrefix}.Avatar` | 237 | const avatarPrefix = `${actorPrefix}.Avatars` |
238 | const id = row[`${avatarPrefix}.id`] | 238 | const id = row[`${avatarPrefix}.id`] |
239 | if (!id || this.actorImagesDone.has(id)) return | 239 | const key = `${row.id}${id}` |
240 | |||
241 | if (!id || this.actorImagesDone.has(key)) return | ||
240 | 242 | ||
241 | const attributes = this.grab(row, this.tables.getAvatarAttributes(), avatarPrefix) | 243 | const attributes = this.grab(row, this.tables.getAvatarAttributes(), avatarPrefix) |
242 | const avatarModel = new ActorImageModel(attributes, this.buildOpts) | 244 | const avatarModel = new ActorImageModel(attributes, this.buildOpts) |
243 | actor.Avatars.push(avatarModel) | 245 | actor.Avatars.push(avatarModel) |
244 | 246 | ||
245 | this.actorImagesDone.add(id) | 247 | this.actorImagesDone.add(key) |
246 | } | 248 | } |
247 | 249 | ||
248 | private addThumbnail (row: SQLRow, videoModel: VideoModel) { | 250 | private addThumbnail (row: SQLRow, videoModel: VideoModel) { |