Merge branch 'experimental'
|
@ -45,7 +45,7 @@
|
|||
|
||||
<script>
|
||||
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() {
|
||||
|
|
After Width: | Height: | Size: 2.5 MiB |
After Width: | Height: | Size: 864 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.2 KiB |
After Width: | Height: | Size: 7.0 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 36 KiB |
|
@ -773,6 +773,7 @@ const tagMedia = [
|
|||
['enhanced-boobs', 'kenzie_anne_playboy', 'Miss Kenzie Anne in "Supercharged"', 'playboy'],
|
||||
['enhanced-boobs', 9, 'Putri Cinta', 'watch4beauty'],
|
||||
['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', 22, 'Sakura Sena'],
|
||||
['enhanced-boobs', 'shawna_lenee_inthecrack_1', 'Shawna Lenee', 'inthecrack'],
|
||||
|
|
|
@ -580,7 +580,7 @@ async function interpolateProfiles(actorIdsOrNames) {
|
|||
|
||||
profile.avatar_media_id = actorProfiles
|
||||
.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;
|
||||
|
||||
return profile;
|
||||
|
@ -646,7 +646,9 @@ async function upsertProfiles(profiles) {
|
|||
}
|
||||
|
||||
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 {
|
||||
// config may group sources to try until success
|
||||
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([
|
||||
fetchEntitiesBySlug(entitySlugs, 'desc'),
|
||||
knex('actors')
|
||||
.select(['id', 'name', 'slug', 'entry_id'])
|
||||
.whereIn('slug', baseActors.map(baseActor => baseActor.slug))
|
||||
.whereNull('alias_for'),
|
||||
.select(knex.raw('actors.id, actors.name, actors.slug, actors.entry_id, actors.entity_id, row_to_json(entities) as entity'))
|
||||
.whereIn('actors.slug', baseActors.map(baseActor => baseActor.slug))
|
||||
.whereNull('actors.alias_for')
|
||||
.leftJoin('entities', 'entities.id', 'actors.entity_id')
|
||||
.groupBy('actors.id', 'entities.id'),
|
||||
]);
|
||||
|
||||
const existingActorEntriesBySlugAndEntryId = existingActorEntries.reduce((acc, actorEntry) => ({
|
||||
|
|
|
@ -25,7 +25,9 @@ function logActive() {
|
|||
}
|
||||
|
||||
async function init() {
|
||||
if (argv.logActive) {
|
||||
logActive();
|
||||
}
|
||||
|
||||
if (argv.server) {
|
||||
await initServer();
|
||||
|
|