From 5b6fefd43bcc8c240695fd3f24a19c099490da01 Mon Sep 17 00:00:00 2001 From: DebaucheryLibrarian Date: Sun, 1 Mar 2026 20:45:30 +0100 Subject: [PATCH] Rounding actor profile values stored as integers to prevent database errors. --- src/actors.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/actors.js b/src/actors.js index 9dbb27db..9b43073a 100755 --- a/src/actors.js +++ b/src/actors.js @@ -440,35 +440,35 @@ async function curateProfile(profile, actor) { || null; curatedProfile.dateOfDeath = Number.isNaN(Number(profile.dateOfDeath)) ? null : profile.dateOfDeath; - curatedProfile.age = Number(profile.age) || null; + curatedProfile.age = Math.round(profile.age) || null; - curatedProfile.height = Number(profile.height) || profile.height?.match?.(/\d+/)?.[0] || null; - curatedProfile.weight = Number(profile.weight) || profile.weight?.match?.(/\d+/)?.[0] || null; - curatedProfile.shoeSize = Number(profile.shoeSize) || profile.shoeSize?.match?.(/\d+/)?.[0] || null; + curatedProfile.height = Math.round(profile.height || profile.height?.match?.(/\d+/)?.[0]) || null; + curatedProfile.weight = Math.round(profile.weight || profile.weight?.match?.(/\d+/)?.[0]) || null; // separate measurement values curatedProfile.cup = profile.cup || (typeof profile.bust === 'string' && profile.bust?.match?.(/[a-zA-Z]+/)?.[0]) || null; - curatedProfile.bust = Number(profile.bust) || profile.bust?.match?.(/\d+/)?.[0] || null; - curatedProfile.waist = Number(profile.waist) || profile.waist?.match?.(/\d+/)?.[0] || null; - curatedProfile.hip = Number(profile.hip) || profile.hip?.match?.(/\d+/)?.[0] || null; + curatedProfile.bust = Math.round(profile.bust || profile.bust?.match?.(/\d+/)?.[0]) || null; + curatedProfile.waist = Math.round(profile.waist || profile.waist?.match?.(/\d+/)?.[0]) || null; + curatedProfile.hip = Math.round(profile.hip || profile.hip?.match?.(/\d+/)?.[0]) || null; - curatedProfile.leg = Number(profile.leg) || profile.leg?.match?.(/\d+/)?.[0] || null; - curatedProfile.thigh = Number(profile.thigh) || profile.thigh?.match?.(/\d+/)?.[0] || null; - curatedProfile.foot = Number(profile.foot) || profile.foot?.match?.(/\d+/)?.[0] || null; + curatedProfile.leg = Math.round(profile.leg || profile.leg?.match?.(/\d+/)?.[0]) || null; + curatedProfile.thigh = Math.round(profile.thigh || profile.thigh?.match?.(/\d+/)?.[0]) || null; + curatedProfile.foot = Number(profile.foot || profile.foot?.match?.(/\d+/)?.[0]) || null; + curatedProfile.shoeSize = Number(profile.shoeSize || profile.shoeSize?.match?.(/\d+/)?.[0]) || null; // combined measurement value // ExCoGi uses x, Jules Jordan has spaces between the dashes, SpermMenia/Cum Buffet sometimes misses cup const measurements = profile.measurements?.match(/(\d+)([a-z]+)?(?:\s*[-x]\s*(\d+)\s*[-x]\s*(\d+))?/i); if (measurements) { - curatedProfile.bust = Number(measurements[1]) || null; + curatedProfile.bust = Math.round(measurements[1]) || null; curatedProfile.cup = measurements[2] || null; - curatedProfile.waist = Number(measurements[3]) || null; - curatedProfile.hip = Number(measurements[4]) || null; + curatedProfile.waist = Math.round(measurements[3]) || null; + curatedProfile.hip = Math.round(measurements[4]) || null; } - curatedProfile.penisLength = Number(profile.penisLength) || profile.penisLength?.match?.(/\d+/)?.[0] || null; - curatedProfile.penisGirth = Number(profile.penisGirth) || profile.penisGirth?.match?.(/\d+/)?.[0] || null; + curatedProfile.penisLength = Math.round(profile.penisLength || profile.penisLength?.match?.(/\d+/)?.[0]) || null; + curatedProfile.penisGirth = Math.round(profile.penisGirth || profile.penisGirth?.match?.(/\d+/)?.[0]) || null; curatedProfile.isCircumcised = getBoolean(profile.isCircumcised); curatedProfile.naturalBoobs = getBoolean(profile.naturalBoobs);