forked from DebaucheryLibrarian/traxxx
Showing avatar on release actor tile. Fixed social URL validation.
This commit is contained in:
parent
61965d480c
commit
af5543190a
|
@ -8,8 +8,6 @@ function curateActor(actor, release) {
|
|||
},
|
||||
};
|
||||
|
||||
if (actor.avatar) curatedActor.avatar = actor.avatar.media;
|
||||
|
||||
if (release && release.date && curatedActor.birthdate) {
|
||||
curatedActor.ageThen = dayjs(release.date).diff(actor.birthdate, 'year');
|
||||
}
|
||||
|
|
|
@ -37,6 +37,12 @@ const actorFields = `
|
|||
birthdate: dateOfBirth
|
||||
age
|
||||
gender
|
||||
avatar: avatarMedia {
|
||||
id
|
||||
path
|
||||
thumbnail
|
||||
lazy
|
||||
}
|
||||
network {
|
||||
id
|
||||
name
|
||||
|
@ -47,15 +53,6 @@ const actorFields = `
|
|||
name
|
||||
alias
|
||||
}
|
||||
actorsProfiles {
|
||||
actorsAvatarByProfileId {
|
||||
media {
|
||||
path
|
||||
thumbnail
|
||||
copyright
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
||||
const releaseActorsFragment = `
|
||||
|
|
|
@ -196,7 +196,7 @@ async function curateProfile(profile) {
|
|||
curatedProfile.social = Array.isArray(profile.social)
|
||||
? profile.social.map((social) => {
|
||||
try {
|
||||
const { href } = new URL();
|
||||
const { href } = new URL(social);
|
||||
return href;
|
||||
} catch (error) {
|
||||
logger.warn(`Profile scraper for '${profile.site.name}' returned invalid social link: ${social}`);
|
||||
|
|
Loading…
Reference in New Issue