fix: videos for api, include avatars

pull/4823/head
kontrollanten 2022-03-01 00:50:42 +01:00
parent aac880eb63
commit 5520a3eda6
1 changed files with 3 additions and 3 deletions

View File

@ -234,15 +234,15 @@ export class VideoModelBuilder {
}
private addActorAvatar (row: SQLRow, actorPrefix: string, actor: ActorModel) {
const avatarPrefix = `${actorPrefix}.Avatar`
const avatarPrefix = `${actorPrefix}.Avatars`
const id = row[`${avatarPrefix}.id`]
if (!id || this.actorImagesDone.has(id)) return
if (!id || this.actorImagesDone.has(`${row.id}${id}`)) return
const attributes = this.grab(row, this.tables.getAvatarAttributes(), avatarPrefix)
const avatarModel = new ActorImageModel(attributes, this.buildOpts)
actor.Avatars.push(avatarModel)
this.actorImagesDone.add(id)
this.actorImagesDone.add(`${row.id}${id}`)
}
private addThumbnail (row: SQLRow, videoModel: VideoModel) {