Merge branch 'experimental'

This commit is contained in:
DebaucheryLibrarian 2021-03-11 15:53:45 +01:00
commit 66ffa420f8
12 changed files with 14 additions and 7 deletions

View File

@ -45,7 +45,7 @@
<script> <script>
function photos() { function photos() {
return this.actor.photos.filter(photo => !photo.entropy || photo.entropy > 6); return this.actor.photos.filter(photo => !photo.entropy || photo.entropy > 5.5);
} }
function sfw() { function sfw() {

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 864 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 36 KiB

View File

@ -773,6 +773,7 @@ const tagMedia = [
['enhanced-boobs', 'kenzie_anne_playboy', 'Miss Kenzie Anne in "Supercharged"', 'playboy'], ['enhanced-boobs', 'kenzie_anne_playboy', 'Miss Kenzie Anne in "Supercharged"', 'playboy'],
['enhanced-boobs', 9, 'Putri Cinta', 'watch4beauty'], ['enhanced-boobs', 9, 'Putri Cinta', 'watch4beauty'],
['enhanced-boobs', 3, 'Ashly Anderson', 'passionhd'], ['enhanced-boobs', 3, 'Ashly Anderson', 'passionhd'],
['enhanced-boobs', 'charlie_atwell_photodromm', 'Charley Atwell', 'photodromm'],
['enhanced-boobs', '23d', 'Lulu Sex Bomb in "Tropical Touch"'], ['enhanced-boobs', '23d', 'Lulu Sex Bomb in "Tropical Touch"'],
['enhanced-boobs', 22, 'Sakura Sena'], ['enhanced-boobs', 22, 'Sakura Sena'],
['enhanced-boobs', 'shawna_lenee_inthecrack_1', 'Shawna Lenee', 'inthecrack'], ['enhanced-boobs', 'shawna_lenee_inthecrack_1', 'Shawna Lenee', 'inthecrack'],

View File

@ -580,7 +580,7 @@ async function interpolateProfiles(actorIdsOrNames) {
profile.avatar_media_id = actorProfiles profile.avatar_media_id = actorProfiles
.map(actorProfile => actorProfile.avatar) .map(actorProfile => actorProfile.avatar)
.filter(avatar => avatar && (avatar.entropy === null || avatar.entropy > 6)) .filter(avatar => avatar && (avatar.entropy === null || avatar.entropy > 5.5))
.sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null; .sort((avatarA, avatarB) => avatarB.height - avatarA.height)[0]?.id || null;
return profile; return profile;
@ -646,7 +646,9 @@ async function upsertProfiles(profiles) {
} }
async function scrapeProfiles(actor, sources, entitiesBySlug, existingProfilesByActorEntityId) { async function scrapeProfiles(actor, sources, entitiesBySlug, existingProfilesByActorEntityId) {
const profiles = Promise.map(sources, async (source) => { const validSources = actor.entity ? sources.filter(source => source === actor.entity.slug) : sources;
const profiles = Promise.map(validSources, async (source) => {
try { try {
// config may group sources to try until success // config may group sources to try until success
return await [].concat(source).reduce(async (outcome, scraperSlug) => outcome.catch(async () => { return await [].concat(source).reduce(async (outcome, scraperSlug) => outcome.catch(async () => {
@ -768,9 +770,11 @@ async function scrapeActors(argNames) {
const [entitiesBySlug, existingActorEntries] = await Promise.all([ const [entitiesBySlug, existingActorEntries] = await Promise.all([
fetchEntitiesBySlug(entitySlugs, 'desc'), fetchEntitiesBySlug(entitySlugs, 'desc'),
knex('actors') knex('actors')
.select(['id', 'name', 'slug', 'entry_id']) .select(knex.raw('actors.id, actors.name, actors.slug, actors.entry_id, actors.entity_id, row_to_json(entities) as entity'))
.whereIn('slug', baseActors.map(baseActor => baseActor.slug)) .whereIn('actors.slug', baseActors.map(baseActor => baseActor.slug))
.whereNull('alias_for'), .whereNull('actors.alias_for')
.leftJoin('entities', 'entities.id', 'actors.entity_id')
.groupBy('actors.id', 'entities.id'),
]); ]);
const existingActorEntriesBySlugAndEntryId = existingActorEntries.reduce((acc, actorEntry) => ({ const existingActorEntriesBySlugAndEntryId = existingActorEntries.reduce((acc, actorEntry) => ({

View File

@ -25,7 +25,9 @@ function logActive() {
} }
async function init() { async function init() {
logActive(); if (argv.logActive) {
logActive();
}
if (argv.server) { if (argv.server) {
await initServer(); await initServer();