forked from DebaucheryLibrarian/traxxx
Added profile interpolation.
This commit is contained in:
@@ -37,8 +37,11 @@ function curateActor(actor) {
|
||||
};
|
||||
|
||||
if (actor.profiles && actor.profiles.length > 0) {
|
||||
curatedActor.avatar = actor.profiles.slice(0, 1)[0].avatar;
|
||||
curatedActor.photos = actor.profiles.slice(1).map(profile => profile.avatar);
|
||||
const photos = actor.profiles
|
||||
.map(profile => profile.avatar)
|
||||
.filter(avatar => avatar && (!curatedActor.avatar || avatar.hash !== curatedActor.avatar.hash));
|
||||
|
||||
curatedActor.photos = Object.values(photos.reduce((acc, photo) => ({ ...acc, [photo.hash]: photo }), {}));
|
||||
}
|
||||
|
||||
if (actor.releases) {
|
||||
@@ -76,6 +79,7 @@ function initActorActions(store, _router) {
|
||||
birthdate: dateOfBirth
|
||||
age
|
||||
ethnicity
|
||||
cup
|
||||
bust
|
||||
waist
|
||||
hip
|
||||
@@ -96,6 +100,15 @@ function initActorActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
hash
|
||||
comment
|
||||
copyright
|
||||
}
|
||||
profiles: actorsProfiles {
|
||||
description
|
||||
avatar: avatarMedia {
|
||||
@@ -103,6 +116,7 @@ function initActorActions(store, _router) {
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
hash
|
||||
comment
|
||||
copyright
|
||||
}
|
||||
@@ -226,6 +240,14 @@ function initActorActions(store, _router) {
|
||||
name
|
||||
slug
|
||||
}
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
comment
|
||||
copyright
|
||||
}
|
||||
actorsProfiles {
|
||||
actorsAvatarByProfileId {
|
||||
media {
|
||||
|
||||
Reference in New Issue
Block a user