Compare commits

..

No commits in common. "71e76e359aa0445fae2a2a66939ae32e1924b5db" and "92eed64fe89602f1cd36b2702224cf5d28ffe4c4" have entirely different histories.

3 changed files with 21 additions and 28 deletions

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.149.9",
"version": "1.149.8",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.149.9",
"version": "1.149.8",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -75,30 +75,8 @@ const ethnicities = {
white: 'white',
};
function getBoolean(value) {
if (typeof value === 'boolean') {
return value;
}
if (typeof value === 'string') {
if (/yes/i.test(value)) {
return true;
}
if (/no/i.test(value)) {
return true;
}
}
return null;
}
function getMostFrequent(items) {
const { mostFrequent } = items.reduce((acc, item) => {
if (item === undefined || item === null) {
return acc;
}
const slug = slugify(item);
acc.counts[slug] = (acc.counts[slug] || 0) + 1;
@ -369,10 +347,25 @@ async function curateProfile(profile, actor) {
curatedProfile.penisLength = Number(profile.penisLength) || profile.penisLength?.match?.(/\d+/)?.[0] || null;
curatedProfile.penisGirth = Number(profile.penisGirth) || profile.penisGirth?.match?.(/\d+/)?.[0] || null;
curatedProfile.circumcised = getBoolean(profile.circumcised);
curatedProfile.naturalBoobs = getBoolean(profile.naturalBoobs);
curatedProfile.hasTattoos = getBoolean(profile.hasTattoos);
curatedProfile.hasPiercings = getBoolean(profile.hasPiercings);
curatedProfile.circumcised = (typeof profile.circumcised === 'boolean' && profile.circumcised)
?? (/yes/i.test(profile.circumcised) && true)
?? (/no/i.test(profile.circumcised) && false)
?? null;
curatedProfile.naturalBoobs = (typeof profile.naturalBoobs === 'boolean' && profile.naturalBoobs)
?? (/yes/i.test(profile.naturalBoobs) && true)
?? (/no/i.test(profile.naturalBoobs) && false)
?? null;
curatedProfile.hasTattoos = (typeof profile.hasTattoos === 'boolean' && profile.hasTattoos)
?? (/yes/i.test(profile.hasTattoos) && true)
?? (/no/i.test(profile.hasTattoos) && true)
?? null;
curatedProfile.hasPiercings = (typeof profile.hasPiercings === 'boolean' && profile.hasPiercings)
?? (/yes/i.test(profile.hasPiercings) && true)
?? (/no/i.test(profile.hasPiercings) && true)
?? null;
if (argv.resolvePlace) {
const [placeOfBirth, placeOfResidence] = await Promise.all([