From 33733720c5e9508a6e7ba48f69fce589d3f8f02f Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sat, 7 Feb 2026 17:19:20 +0100 Subject: [PATCH] Added avatar credit exclusion to profile interpolation. --- actors.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/actors.mjs b/actors.mjs index 493509f..945c26f 100644 --- a/actors.mjs +++ b/actors.mjs @@ -164,14 +164,14 @@ export async function interpolateProfiles(actorIdsOrNames, context, options = {} profile.avatar_media_id = actorProfiles .map((actorProfile) => actorProfile.avatar) - .filter((avatar) => avatar && (avatar.entropy === null || avatar.entropy > 5.5)) + .filter((avatar) => avatar && (avatar.entropy === null || avatar.entropy > 5.5) && !options.avoidAvatarCredits?.includes(avatar.credit) && !options.excludeAvatarCredits?.includes(avatar.credit)) .sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null; if (!profile.avatar_media_id) { // try to settle for low quality avatar profile.avatar_media_id = actorProfiles .map((actorProfile) => actorProfile.avatar) - .filter((avatar) => avatar) + .filter((avatar) => !!avatar && !options?.excludeAvatarCredits?.includes(avatar.credit)) .sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null; }