fix: videos for api, include avatars
This commit is contained in:
parent
aac880eb63
commit
5520a3eda6
|
@ -234,15 +234,15 @@ export class VideoModelBuilder {
|
||||||
}
|
}
|
||||||
|
|
||||||
private addActorAvatar (row: SQLRow, actorPrefix: string, actor: ActorModel) {
|
private addActorAvatar (row: SQLRow, actorPrefix: string, actor: ActorModel) {
|
||||||
const avatarPrefix = `${actorPrefix}.Avatar`
|
const avatarPrefix = `${actorPrefix}.Avatars`
|
||||||
const id = row[`${avatarPrefix}.id`]
|
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 attributes = this.grab(row, this.tables.getAvatarAttributes(), avatarPrefix)
|
||||||
const avatarModel = new ActorImageModel(attributes, this.buildOpts)
|
const avatarModel = new ActorImageModel(attributes, this.buildOpts)
|
||||||
actor.Avatars.push(avatarModel)
|
actor.Avatars.push(avatarModel)
|
||||||
|
|
||||||
this.actorImagesDone.add(id)
|
this.actorImagesDone.add(`${row.id}${id}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
private addThumbnail (row: SQLRow, videoModel: VideoModel) {
|
private addThumbnail (row: SQLRow, videoModel: VideoModel) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user