mirror of https://github.com/Chocobozzz/PeerTube
fix: videos for api, include avatars
parent
aac880eb63
commit
5520a3eda6
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue