Compare commits
62 Commits
b5b87ff82e
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a62cfcac3d | ||
|
|
5b9c635ed1 | ||
|
|
ad56e7b9e0 | ||
|
|
4eb6840c2a | ||
|
|
9f173d7aee | ||
|
|
5f0320fde0 | ||
|
|
d21ba65a43 | ||
|
|
ea61b45a87 | ||
|
|
f34de8d1b0 | ||
|
|
f1898e6942 | ||
|
|
8970757a8e | ||
|
|
c55953769f | ||
|
|
cf8f1a0f7b | ||
|
|
1efa4715d7 | ||
|
|
ec307112a9 | ||
|
|
8f0609ade2 | ||
|
|
327f255c9d | ||
|
|
06a5f5bec7 | ||
|
|
00ba8b9dd3 | ||
|
|
d7e0171b2f | ||
|
|
14ad2fd0f8 | ||
|
|
5a71f00d3d | ||
|
|
3529b66032 | ||
|
|
108017884a | ||
|
|
be31679886 | ||
|
|
dac74e5a28 | ||
|
|
de8239167a | ||
|
|
0094ea40ae | ||
|
|
162fcc49c6 | ||
|
|
b34dd33b5c | ||
|
|
b4ecfd63d3 | ||
|
|
c7dc893d43 | ||
|
|
fe74e83282 | ||
|
|
45acc9bf3c | ||
|
|
043b98fd49 | ||
|
|
a3a2de2e04 | ||
|
|
56b18618be | ||
|
|
a68c8539fd | ||
|
|
a3ae82dcd3 | ||
|
|
c3dad0b523 | ||
|
|
25af9152d7 | ||
|
|
8060be166b | ||
|
|
46fcd1465a | ||
|
|
42027d0856 | ||
|
|
70d4a05aeb | ||
|
|
b2941940e3 | ||
|
|
270cc36e65 | ||
|
|
6fa03081ef | ||
|
|
4a60cadb4b | ||
|
|
d4db2ee1e4 | ||
|
|
76e6e60d69 | ||
|
|
7aa7b9bef1 | ||
|
|
04d1e340f5 | ||
|
|
a5c91ad816 | ||
|
|
35c17d32bb | ||
|
|
bfb7c8b080 | ||
|
|
be27b325ca | ||
|
|
969c576eb8 | ||
|
|
66e0076083 | ||
|
|
1143f0865d | ||
|
|
da7e30ff59 | ||
|
|
242b7d9271 |
@@ -181,6 +181,8 @@ module.exports = {
|
||||
'traxxx',
|
||||
// porn doe
|
||||
'forbondage',
|
||||
// prevent huge influx
|
||||
'manyvids',
|
||||
],
|
||||
},
|
||||
profiles: null,
|
||||
|
||||
@@ -40,6 +40,7 @@ exports.up = async (knex) => {
|
||||
.index();
|
||||
|
||||
table.text('name');
|
||||
table.string('name_stylized');
|
||||
table.text('slug', 32);
|
||||
|
||||
table.text('type')
|
||||
@@ -126,10 +127,15 @@ exports.up = async (knex) => {
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createMaterializedView('media_sfw', (view) => {
|
||||
view.as(knex('media').select('id').where('is_sfw', true));
|
||||
});
|
||||
|
||||
await knex.raw('CREATE UNIQUE INDEX media_sfw_id ON media_sfw(id)');
|
||||
|
||||
await knex.raw(`
|
||||
CREATE FUNCTION get_random_sfw_media_id() RETURNS varchar AS $$
|
||||
SELECT id FROM media
|
||||
WHERE is_sfw = true
|
||||
SELECT id FROM media_sfw
|
||||
ORDER BY random()
|
||||
LIMIT 1;
|
||||
$$ LANGUAGE sql STABLE;
|
||||
@@ -143,6 +149,36 @@ exports.up = async (knex) => {
|
||||
.defaultTo(knex.raw('get_random_sfw_media_id()'));
|
||||
});
|
||||
|
||||
await knex.schema.createTable('media_biometrics', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.string('media_id', 21)
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.notNullable()
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('width');
|
||||
table.integer('height');
|
||||
|
||||
table.integer('face_index')
|
||||
.notNullable()
|
||||
.defaultTo(0);
|
||||
|
||||
table.json('biometrics');
|
||||
table.specificType('embedding', 'vector(1024)');
|
||||
|
||||
table.datetime('updated_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
|
||||
table.unique(['media_id', 'face_index']);
|
||||
});
|
||||
|
||||
await knex.schema.createTable('tags_groups', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
@@ -335,7 +371,7 @@ exports.up = async (knex) => {
|
||||
|
||||
table.decimal('shoe_size');
|
||||
table.integer('leg');
|
||||
table.integer('foot');
|
||||
table.decimal('foot');
|
||||
table.integer('thigh');
|
||||
|
||||
table.string('blood_type');
|
||||
@@ -357,6 +393,9 @@ exports.up = async (knex) => {
|
||||
|
||||
table.string('agency');
|
||||
|
||||
table.boolean('allow_global_match');
|
||||
table.text('comment');
|
||||
|
||||
table.text('avatar_media_id', 21)
|
||||
.references('id')
|
||||
.inTable('media');
|
||||
@@ -443,7 +482,7 @@ exports.up = async (knex) => {
|
||||
|
||||
table.decimal('shoe_size');
|
||||
table.integer('leg');
|
||||
table.integer('foot');
|
||||
table.decimal('foot');
|
||||
table.integer('thigh');
|
||||
|
||||
table.string('blood_type');
|
||||
@@ -655,6 +694,7 @@ exports.up = async (knex) => {
|
||||
.inTable('actors');
|
||||
|
||||
table.integer('profile_id', 12)
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('actors_profiles')
|
||||
.onDelete('cascade');
|
||||
@@ -672,8 +712,6 @@ exports.up = async (knex) => {
|
||||
table.unique(['profile_id', 'media_id']);
|
||||
});
|
||||
|
||||
await knex.raw('CREATE UNIQUE INDEX unique_main_avatars ON actors_avatars (actor_id) WHERE (profile_id IS NULL);');
|
||||
|
||||
await knex.schema.createTable('actors_photos', (table) => {
|
||||
table.integer('actor_id', 12)
|
||||
.notNullable()
|
||||
@@ -713,12 +751,20 @@ exports.up = async (knex) => {
|
||||
table.datetime('pinged_at');
|
||||
table.datetime('verified_at');
|
||||
|
||||
table.unique(['actor_id', 'platform', 'handle']);
|
||||
table.unique(['actor_id', 'url']);
|
||||
});
|
||||
|
||||
await knex.raw('ALTER TABLE actors_socials ADD CONSTRAINT socials_url_or_handle CHECK (num_nulls(handle, url) = 1);');
|
||||
await knex.raw('ALTER TABLE actors_socials ADD CONSTRAINT socials_handle_and_platform CHECK (num_nulls(platform, handle) = 2 or num_nulls(platform, handle) = 0);');
|
||||
await knex.raw('CREATE UNIQUE INDEX actors_socials_actor_id_platform_handle_lower_unique ON actors_socials (actor_id, platform, lower(handle));');
|
||||
|
||||
await knex.schema.createTable('languages', (table) => {
|
||||
table.string('alpha2')
|
||||
.primary();
|
||||
|
||||
table.text('name');
|
||||
table.text('name_native');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('releases', (table) => {
|
||||
table.increments('id');
|
||||
@@ -741,6 +787,7 @@ exports.up = async (knex) => {
|
||||
table.text('url', 1000);
|
||||
table.text('title');
|
||||
table.specificType('alt_titles', 'text ARRAY');
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
table.text('slug');
|
||||
|
||||
table.timestamp('date');
|
||||
@@ -758,6 +805,13 @@ exports.up = async (knex) => {
|
||||
table.enum('date_precision', ['year', 'month', 'week', 'day', 'hour', 'minute', 'second'])
|
||||
.defaultTo('day');
|
||||
|
||||
table.enum('production_date_precision', ['year', 'month', 'week', 'day', 'hour', 'minute', 'second'])
|
||||
.defaultTo('day');
|
||||
|
||||
table.string('language_alpha2')
|
||||
.references('alpha2')
|
||||
.inTable('languages');
|
||||
|
||||
table.text('description');
|
||||
|
||||
table.integer('duration')
|
||||
@@ -773,6 +827,8 @@ exports.up = async (knex) => {
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.json('attributes');
|
||||
|
||||
table.integer('created_batch_id', 12)
|
||||
.references('id')
|
||||
.inTable('batches')
|
||||
@@ -937,6 +993,8 @@ exports.up = async (knex) => {
|
||||
});
|
||||
|
||||
await knex.schema.createTable('releases_tags', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('tag_id', 12)
|
||||
.references('id')
|
||||
.inTable('tags');
|
||||
@@ -947,9 +1005,13 @@ exports.up = async (knex) => {
|
||||
.inTable('releases')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('actor_id')
|
||||
.references('id')
|
||||
.inTable('actors');
|
||||
|
||||
table.text('original_tag');
|
||||
|
||||
table.unique(['tag_id', 'release_id']);
|
||||
table.unique(['release_id', 'original_tag']);
|
||||
table.index('tag_id');
|
||||
table.index('release_id');
|
||||
|
||||
@@ -958,12 +1020,7 @@ exports.up = async (knex) => {
|
||||
.defaultTo('scraper');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('releases_search', (table) => {
|
||||
table.integer('release_id', 16)
|
||||
.references('id')
|
||||
.inTable('releases')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
await knex.raw('CREATE UNIQUE INDEX releases_tags_tag_id_release_id_actor_id ON releases_tags (tag_id, release_id, COALESCE(actor_id, -1));');
|
||||
|
||||
await knex.schema.createTable('movies', (table) => {
|
||||
table.increments('id');
|
||||
@@ -984,6 +1041,7 @@ exports.up = async (knex) => {
|
||||
table.text('url', 1000);
|
||||
table.text('title');
|
||||
table.specificType('alt_titles', 'text ARRAY');
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
table.text('slug');
|
||||
|
||||
table.timestamp('date');
|
||||
@@ -1000,6 +1058,8 @@ exports.up = async (knex) => {
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.json('attributes');
|
||||
|
||||
table.integer('created_batch_id', 12)
|
||||
.references('id')
|
||||
.inTable('batches')
|
||||
@@ -1134,13 +1194,6 @@ exports.up = async (knex) => {
|
||||
table.unique(['movie_id', 'media_id']);
|
||||
});
|
||||
|
||||
await knex.schema.createTable('movies_search', (table) => {
|
||||
table.integer('movie_id', 16)
|
||||
.references('id')
|
||||
.inTable('movies')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('series', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
@@ -1159,6 +1212,7 @@ exports.up = async (knex) => {
|
||||
table.text('url', 1000);
|
||||
table.text('title');
|
||||
table.specificType('alt_titles', 'text ARRAY');
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
table.text('slug');
|
||||
|
||||
table.timestamp('date');
|
||||
@@ -1175,6 +1229,8 @@ exports.up = async (knex) => {
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.json('attributes');
|
||||
|
||||
table.integer('created_batch_id', 12)
|
||||
.references('id')
|
||||
.inTable('batches')
|
||||
@@ -1288,13 +1344,6 @@ exports.up = async (knex) => {
|
||||
table.unique(['serie_id', 'media_id']);
|
||||
});
|
||||
|
||||
await knex.schema.createTable('series_search', (table) => {
|
||||
table.integer('serie_id', 16)
|
||||
.references('id')
|
||||
.inTable('series')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('chapters', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
@@ -1316,6 +1365,8 @@ exports.up = async (knex) => {
|
||||
table.text('title');
|
||||
table.text('description');
|
||||
|
||||
table.datetime('date');
|
||||
|
||||
table.integer('created_batch_id', 12)
|
||||
.references('id')
|
||||
.inTable('batches')
|
||||
@@ -1379,6 +1430,34 @@ exports.up = async (knex) => {
|
||||
table.unique(['tag_id', 'chapter_id']);
|
||||
});
|
||||
|
||||
await knex.schema.createTable('chapters_trailers', (table) => {
|
||||
table.integer('chapter_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('chapters')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('media_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('chapters_teasers', (table) => {
|
||||
table.integer('chapter_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('chapters')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('media_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('users_roles', (table) => {
|
||||
table.string('role')
|
||||
.primary();
|
||||
@@ -1396,7 +1475,9 @@ exports.up = async (knex) => {
|
||||
{ subject: 'actor', action: 'create' },
|
||||
{ subject: 'actor', action: 'update' },
|
||||
{ subject: 'actor', action: 'delete' },
|
||||
{ plainUrls: true },
|
||||
{ subject: 'actor', action: 'merge' },
|
||||
{ subject: 'sync' },
|
||||
{ subject: 'plainUrls' },
|
||||
]),
|
||||
},
|
||||
{
|
||||
@@ -1442,6 +1523,8 @@ exports.up = async (knex) => {
|
||||
|
||||
table.specificType('last_ip', 'cidr');
|
||||
|
||||
table.jsonb('settings');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
@@ -1660,6 +1743,98 @@ exports.up = async (knex) => {
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('user_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('users')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.string('name')
|
||||
.notNullable();
|
||||
|
||||
table.string('slug')
|
||||
.notNullable();
|
||||
|
||||
table.boolean('public');
|
||||
table.boolean('primary');
|
||||
|
||||
table.text('comment');
|
||||
table.json('meta');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_entities', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('entity_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('entities')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_actors', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('actor_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('actors')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_tags', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('tag_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('tags')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('alerts', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
@@ -1698,6 +1873,10 @@ exports.up = async (knex) => {
|
||||
.notNullable()
|
||||
.defaultTo(false);
|
||||
|
||||
table.boolean('is_expired')
|
||||
.notNullable()
|
||||
.defaultTo(false);
|
||||
|
||||
table.json('meta');
|
||||
table.text('comment');
|
||||
|
||||
@@ -1878,6 +2057,31 @@ exports.up = async (knex) => {
|
||||
);
|
||||
});
|
||||
|
||||
await knex.schema.createMaterializedView('alerts_users_scenes', (view) => {
|
||||
view.columns('user_id', 'scene_id', 'alert_ids');
|
||||
|
||||
view.as(
|
||||
knex('alerts_scenes')
|
||||
.select(
|
||||
'alerts.user_id',
|
||||
'alerts_scenes.scene_id',
|
||||
knex.raw('array_agg(distinct alerts.id) as alert_ids'),
|
||||
knex.raw('(alerts_tags.id is null and alerts_entities.id is null and alerts_matches.id is null and related_scenes.id is null) as is_only'),
|
||||
)
|
||||
.leftJoin('alerts', 'alerts.id', 'alerts_scenes.alert_id')
|
||||
.leftJoin('alerts_entities', 'alerts_entities.alert_id', 'alerts_scenes.alert_id')
|
||||
.leftJoin('alerts_tags', 'alerts_tags.alert_id', 'alerts_scenes.alert_id')
|
||||
.leftJoin('alerts_matches', 'alerts_matches.alert_id', 'alerts_scenes.alert_id')
|
||||
.leftJoin('alerts_scenes as related_scenes', (joinBuilder) => {
|
||||
joinBuilder
|
||||
.on('related_scenes.alert_id', 'alerts_scenes.alert_id')
|
||||
.on('related_scenes.scene_id', '!=', 'alerts_scenes.scene_id');
|
||||
})
|
||||
.where('alerts.is_expired', false)
|
||||
.groupBy(['user_id', 'alerts_scenes.scene_id', 'is_only']),
|
||||
);
|
||||
});
|
||||
|
||||
await knex.schema.createTable('notifications', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
@@ -1901,6 +2105,18 @@ exports.up = async (knex) => {
|
||||
.notNullable()
|
||||
.defaultTo(false);
|
||||
|
||||
table.datetime('seen_at');
|
||||
|
||||
table.boolean('notify')
|
||||
.notNullable()
|
||||
.defaultTo(true);
|
||||
|
||||
table.boolean('email')
|
||||
.notNullable()
|
||||
.defaultTo(false);
|
||||
|
||||
table.datetime('emailed_at');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
@@ -2177,12 +2393,20 @@ exports.up = async (knex) => {
|
||||
.inTable('entities');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('sync', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.string('domain');
|
||||
table.specificType('item_ids', 'integer array');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
// SEARCH AND SORT
|
||||
await knex.raw(`
|
||||
ALTER TABLE releases_search ADD COLUMN document tsvector;
|
||||
ALTER TABLE movies_search ADD COLUMN document tsvector;
|
||||
ALTER TABLE series_search ADD COLUMN document tsvector;
|
||||
|
||||
/* allow scenes without dates to be mixed inbetween scenes with dates */
|
||||
ALTER TABLE releases
|
||||
ADD COLUMN effective_date timestamptz
|
||||
@@ -2200,19 +2424,12 @@ exports.up = async (knex) => {
|
||||
// INDEXES
|
||||
await knex.raw(`
|
||||
CREATE UNIQUE INDEX unique_actor_slugs_network ON actors (slug, entity_id, entry_id);
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug) WHERE entity_id IS NULL;
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug, entry_id) WHERE entity_id IS NULL;
|
||||
|
||||
CREATE UNIQUE INDEX unique_entity_campaigns_banner_url ON campaigns (entity_id, url, banner_id) WHERE affiliate_id IS NULL;
|
||||
CREATE UNIQUE INDEX unique_entity_campaigns_url ON campaigns (entity_id, url) WHERE banner_id IS NULL AND affiliate_id IS NULL;
|
||||
CREATE UNIQUE INDEX unique_entity_campaigns_banner_affiliate ON campaigns (entity_id, affiliate_id, banner_id) WHERE url IS NULL;
|
||||
CREATE UNIQUE INDEX unique_entity_campaigns_affiliate ON campaigns (entity_id, affiliate_id) WHERE banner_id IS NULL AND url IS NULL;
|
||||
|
||||
CREATE UNIQUE INDEX releases_search_unique ON releases_search (release_id);
|
||||
CREATE UNIQUE INDEX movies_search_unique ON movies_search (movie_id);
|
||||
CREATE INDEX releases_search_index ON releases_search USING GIN (document);
|
||||
CREATE INDEX movies_search_index ON movies_search USING GIN (document);
|
||||
CREATE UNIQUE INDEX series_search_unique ON series_search (serie_id);
|
||||
CREATE INDEX series_search_index ON series_search USING GIN (document);
|
||||
`);
|
||||
|
||||
// FUNCTIONS
|
||||
@@ -2275,7 +2492,8 @@ exports.up = async (knex) => {
|
||||
stashes.id as stash_id,
|
||||
COUNT(DISTINCT stashes_scenes)::integer as stashed_scenes,
|
||||
COUNT(DISTINCT stashes_movies)::integer as stashed_movies,
|
||||
COUNT(DISTINCT stashes_actors)::integer as stashed_actors
|
||||
COUNT(DISTINCT stashes_actors)::integer as stashed_actors,
|
||||
MAX(GREATEST(stashes_scenes.created_at, stashes_movies.created_at, stashes_actors.created_at)) as last_stash_at
|
||||
FROM stashes
|
||||
LEFT JOIN stashes_scenes ON stashes_scenes.stash_id = stashes.id
|
||||
LEFT JOIN stashes_movies ON stashes_movies.stash_id = stashes.id
|
||||
@@ -2372,6 +2590,8 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
|
||||
DROP TABLE IF EXISTS chapters_tags CASCADE;
|
||||
DROP TABLE IF EXISTS chapters_posters CASCADE;
|
||||
DROP TABLE IF EXISTS chapters_photos CASCADE;
|
||||
DROP TABLE IF EXISTS chapters_trailers CASCADE;
|
||||
DROP TABLE IF EXISTS chapters_teasers CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS banners_tags CASCADE;
|
||||
DROP TABLE IF EXISTS banners CASCADE;
|
||||
@@ -2381,6 +2601,7 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
|
||||
|
||||
DROP TABLE IF EXISTS batches CASCADE;
|
||||
DROP TABLE IF EXISTS fingerprints_types CASCADE;
|
||||
DROP TABLE IF EXISTS sync CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS actors_avatars CASCADE;
|
||||
DROP TABLE IF EXISTS actors_photos CASCADE;
|
||||
@@ -2412,8 +2633,10 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
|
||||
DROP TABLE IF EXISTS sites CASCADE;
|
||||
DROP TABLE IF EXISTS studios CASCADE;
|
||||
DROP TABLE IF EXISTS media_sfw CASCADE;
|
||||
DROP TABLE IF EXISTS media_biometrics CASCADE;
|
||||
DROP TABLE IF EXISTS media CASCADE;
|
||||
DROP TABLE IF EXISTS countries CASCADE;
|
||||
DROP TABLE IF EXISTS languages CASCADE;
|
||||
DROP TABLE IF EXISTS networks CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS entities_types CASCADE;
|
||||
@@ -2426,6 +2649,11 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
|
||||
DROP TABLE IF EXISTS stashes_actors CASCADE;
|
||||
DROP TABLE IF EXISTS stashes CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS feeds_entities CASCADE;
|
||||
DROP TABLE IF EXISTS feeds_actors CASCADE;
|
||||
DROP TABLE IF EXISTS feeds_tags CASCADE;
|
||||
DROP TABLE IF EXISTS feeds CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS alerts_scenes CASCADE;
|
||||
DROP TABLE IF EXISTS alerts_actors CASCADE;
|
||||
DROP TABLE IF EXISTS alerts_tags CASCADE;
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
exports.up = async (knex) => {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.json('attributes');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('movies', (table) => {
|
||||
table.json('attributes');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async (knex) => {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.dropColumn('attributes');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('movies', (table) => {
|
||||
table.dropColumn('attributes');
|
||||
});
|
||||
};
|
||||
@@ -1,11 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.dropColumn('alt_descriptions');
|
||||
});
|
||||
};
|
||||
@@ -1,58 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('chapters', (table) => {
|
||||
table.datetime('date');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('chapters_trailers', (table) => {
|
||||
table.integer('chapter_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('chapters')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('media_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('chapters_teasers', (table) => {
|
||||
table.integer('chapter_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('chapters')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('media_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('entities', (table) => {
|
||||
table.string('name_stylized');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('movies', (table) => {
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('chapters', (table) => {
|
||||
table.dropColumn('date');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('entities', (table) => {
|
||||
table.dropColumn('name_stylized');
|
||||
});
|
||||
|
||||
await knex.schema.dropTable('chapters_trailers');
|
||||
await knex.schema.dropTable('chapters_teasers');
|
||||
|
||||
await knex.schema.alterTable('movies', (table) => {
|
||||
table.dropColumn('alt_descriptions');
|
||||
});
|
||||
};
|
||||
@@ -1,28 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createMaterializedView('media_sfw', (view) => {
|
||||
view.as(knex('media').select('id').where('is_sfw', true));
|
||||
});
|
||||
|
||||
await knex.raw('CREATE UNIQUE INDEX media_sfw_id ON media_sfw(id)');
|
||||
|
||||
await knex.raw(`
|
||||
CREATE OR REPLACE FUNCTION get_random_sfw_media_id() RETURNS varchar AS $$
|
||||
SELECT id FROM media_sfw
|
||||
ORDER BY random()
|
||||
LIMIT 1;
|
||||
$$ LANGUAGE sql STABLE;
|
||||
`);
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.raw(`
|
||||
CREATE OR REPLACE FUNCTION get_random_sfw_media_id() RETURNS varchar AS $$
|
||||
SELECT id FROM media
|
||||
WHERE is_sfw = true
|
||||
ORDER BY random()
|
||||
LIMIT 1;
|
||||
$$ LANGUAGE sql STABLE;
|
||||
`);
|
||||
|
||||
await knex.schema.dropMaterializedView('media_sfw');
|
||||
};
|
||||
@@ -1,31 +0,0 @@
|
||||
exports.up = async (knex) => {
|
||||
// dedupe
|
||||
await knex.raw(`
|
||||
DELETE
|
||||
FROM releases_tags
|
||||
WHERE ctid IN
|
||||
(
|
||||
SELECT ctid
|
||||
FROM(
|
||||
SELECT
|
||||
*,
|
||||
ctid,
|
||||
row_number() OVER (PARTITION BY release_id, original_tag ORDER BY ctid)
|
||||
FROM releases_tags
|
||||
)s
|
||||
WHERE row_number >= 2
|
||||
)
|
||||
`);
|
||||
|
||||
await knex.schema.alterTable('releases_tags', (table) => {
|
||||
table.increments('id');
|
||||
table.unique(['release_id', 'original_tag']);
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async (knex) => {
|
||||
await knex.schema.alterTable('releases_tags', (table) => {
|
||||
table.dropColumn('id');
|
||||
table.dropUnique(['release_id', 'original_tag']);
|
||||
});
|
||||
};
|
||||
@@ -1,23 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.decimal('foot')
|
||||
.alter();
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||
table.decimal('foot')
|
||||
.alter();
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.integer('foot')
|
||||
.alter();
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||
table.integer('foot')
|
||||
.alter();
|
||||
});
|
||||
};
|
||||
@@ -1,13 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('series', (table) => {
|
||||
table.specificType('alt_descriptions', 'text ARRAY');
|
||||
table.json('attributes');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('series', (table) => {
|
||||
table.dropColumn('alt_descriptions');
|
||||
table.dropColumn('attributes');
|
||||
});
|
||||
};
|
||||
@@ -1,21 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('releases_tags', (table) => {
|
||||
table.integer('actor_id')
|
||||
.references('id')
|
||||
.inTable('actors');
|
||||
|
||||
table.dropUnique(['tag_id', 'release_id']);
|
||||
});
|
||||
|
||||
await knex.raw('CREATE UNIQUE INDEX releases_tags_tag_id_release_id_actor_id ON releases_tags (tag_id, release_id, COALESCE(actor_id, -1))');
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('releases_tags', (table) => {
|
||||
table.dropColumn('actor_id');
|
||||
|
||||
table.unique(['tag_id', 'release_id']);
|
||||
});
|
||||
|
||||
await knex.raw('DROP INDEX IF EXISTS releases_tags_tag_id_release_id_actor_id');
|
||||
};
|
||||
@@ -1,27 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createTable('languages', (table) => {
|
||||
table.string('alpha2')
|
||||
.primary();
|
||||
|
||||
table.text('name');
|
||||
table.text('name_native');
|
||||
});
|
||||
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.enum('production_date_precision', ['year', 'month', 'week', 'day', 'hour', 'minute', 'second'])
|
||||
.defaultTo('day');
|
||||
|
||||
table.string('language_alpha2')
|
||||
.references('alpha2')
|
||||
.inTable('languages');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('releases', (table) => {
|
||||
table.dropColumn('production_date_precision');
|
||||
table.dropColumn('language_alpha2');
|
||||
});
|
||||
|
||||
await knex.schema.dropTable('languages');
|
||||
};
|
||||
@@ -1,100 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createTable('feeds', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('user_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('users')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.string('name')
|
||||
.notNullable();
|
||||
|
||||
table.string('slug')
|
||||
.notNullable();
|
||||
|
||||
table.boolean('public');
|
||||
table.boolean('primary');
|
||||
|
||||
table.text('comment');
|
||||
table.json('meta');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_entities', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('entity_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('entities')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_actors', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('actor_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('actors')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex.schema.createTable('feeds_tags', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.integer('feed_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('feeds')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('tag_id')
|
||||
.notNullable()
|
||||
.references('id')
|
||||
.inTable('tags')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.dropTable('feeds_tags');
|
||||
await knex.schema.dropTable('feeds_actors');
|
||||
await knex.schema.dropTable('feeds_entities');
|
||||
await knex.schema.dropTable('feeds');
|
||||
};
|
||||
@@ -1,59 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.raw(`
|
||||
DROP INDEX unique_actor_slugs;
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug, entry_id) WHERE entity_id IS NULL;
|
||||
`);
|
||||
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.boolean('allow_global_match');
|
||||
table.text('comment');
|
||||
});
|
||||
|
||||
await knex('users_roles')
|
||||
.update('abilities', JSON.stringify([
|
||||
{ subject: 'scene', action: 'create' },
|
||||
{ subject: 'scene', action: 'update' },
|
||||
{ subject: 'scene', action: 'delete' },
|
||||
{ subject: 'actor', action: 'create' },
|
||||
{ subject: 'actor', action: 'update' },
|
||||
{ subject: 'actor', action: 'delete' },
|
||||
{ subject: 'actor', action: 'merge' },
|
||||
{ plainUrls: true },
|
||||
]))
|
||||
.where('role', 'admin');
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
const dupes = await knex('actors')
|
||||
.select('name', 'slug', knex.raw('count(*) as count'))
|
||||
.whereNull('entity_id')
|
||||
.groupBy('name', 'slug')
|
||||
.havingRaw('count(*) > 1')
|
||||
.orderBy('count', 'desc');
|
||||
|
||||
if (dupes.length > 0) {
|
||||
console.log('DUPES\n', dupes.map((actor) => `${actor.name} ${actor.slug} ${actor.count}`).join('\n'));
|
||||
}
|
||||
|
||||
await knex.raw(`
|
||||
DROP INDEX unique_actor_slugs;
|
||||
CREATE UNIQUE INDEX unique_actor_slugs ON actors (slug) WHERE entity_id IS NULL;
|
||||
`);
|
||||
|
||||
await knex.schema.alterTable('actors', (table) => {
|
||||
table.dropColumn('allow_global_match');
|
||||
table.dropColumn('comment');
|
||||
});
|
||||
|
||||
await knex('users_roles')
|
||||
.update('abilities', JSON.stringify([
|
||||
{ subject: 'scene', action: 'create' },
|
||||
{ subject: 'scene', action: 'update' },
|
||||
{ subject: 'scene', action: 'delete' },
|
||||
{ subject: 'actor', action: 'create' },
|
||||
{ subject: 'actor', action: 'update' },
|
||||
{ subject: 'actor', action: 'delete' },
|
||||
{ plainUrls: true },
|
||||
]))
|
||||
.where('role', 'admin');
|
||||
};
|
||||
@@ -1,87 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createTable('sync', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.string('domain');
|
||||
table.specificType('item_ids', 'integer array');
|
||||
|
||||
table.text('comment');
|
||||
|
||||
table.datetime('created_at')
|
||||
.defaultTo(knex.fn.now());
|
||||
});
|
||||
|
||||
await knex('users_roles')
|
||||
.update('abilities', JSON.stringify([
|
||||
{ subject: 'scene', action: 'create' },
|
||||
{ subject: 'scene', action: 'update' },
|
||||
{ subject: 'scene', action: 'delete' },
|
||||
{ subject: 'actor', action: 'create' },
|
||||
{ subject: 'actor', action: 'update' },
|
||||
{ subject: 'actor', action: 'delete' },
|
||||
{ subject: 'actor', action: 'merge' },
|
||||
{ subject: 'sync' },
|
||||
{ subject: 'plainUrls' },
|
||||
]))
|
||||
.where('role', 'admin');
|
||||
|
||||
await knex.raw(`
|
||||
DROP TABLE IF EXISTS releases_search CASCADE;
|
||||
DROP TABLE IF EXISTS movies_search CASCADE;
|
||||
DROP TABLE IF EXISTS series_search CASCADE;
|
||||
|
||||
DROP TABLE IF EXISTS releases_search_results CASCADE;
|
||||
DROP TABLE IF EXISTS movies_search_results CASCADE;
|
||||
`);
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.dropTable('sync');
|
||||
|
||||
await knex('users_roles')
|
||||
.update('abilities', JSON.stringify([
|
||||
{ subject: 'scene', action: 'create' },
|
||||
{ subject: 'scene', action: 'update' },
|
||||
{ subject: 'scene', action: 'delete' },
|
||||
{ subject: 'actor', action: 'create' },
|
||||
{ subject: 'actor', action: 'update' },
|
||||
{ subject: 'actor', action: 'delete' },
|
||||
{ subject: 'actor', action: 'merge' },
|
||||
{ plainUrls: true },
|
||||
]))
|
||||
.where('role', 'admin');
|
||||
|
||||
await knex.schema.createTable('releases_search', (table) => {
|
||||
table.integer('release_id', 16)
|
||||
.references('id')
|
||||
.inTable('releases')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('movies_search', (table) => {
|
||||
table.integer('movie_id', 16)
|
||||
.references('id')
|
||||
.inTable('movies')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.schema.createTable('series_search', (table) => {
|
||||
table.integer('serie_id', 16)
|
||||
.references('id')
|
||||
.inTable('series')
|
||||
.onDelete('cascade');
|
||||
});
|
||||
|
||||
await knex.raw(`
|
||||
ALTER TABLE releases_search ADD COLUMN document tsvector;
|
||||
ALTER TABLE movies_search ADD COLUMN document tsvector;
|
||||
ALTER TABLE series_search ADD COLUMN document tsvector;
|
||||
|
||||
CREATE UNIQUE INDEX releases_search_unique ON releases_search (release_id);
|
||||
CREATE UNIQUE INDEX movies_search_unique ON movies_search (movie_id);
|
||||
CREATE INDEX releases_search_index ON releases_search USING GIN (document);
|
||||
CREATE INDEX movies_search_index ON movies_search USING GIN (document);
|
||||
CREATE UNIQUE INDEX series_search_unique ON series_search (serie_id);
|
||||
CREATE INDEX series_search_index ON series_search USING GIN (document);
|
||||
`);
|
||||
};
|
||||
@@ -1,35 +0,0 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.createTable('media_biometrics', (table) => {
|
||||
table.increments('id');
|
||||
|
||||
table.string('media_id', 21)
|
||||
.references('id')
|
||||
.inTable('media')
|
||||
.notNullable()
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('width');
|
||||
table.integer('height');
|
||||
|
||||
table.integer('face_index')
|
||||
.notNullable()
|
||||
.defaultTo(0);
|
||||
|
||||
table.json('biometrics');
|
||||
table.specificType('embedding', 'vector(1024)');
|
||||
|
||||
table.datetime('updated_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
|
||||
table.datetime('created_at')
|
||||
.notNullable()
|
||||
.defaultTo(knex.fn.now());
|
||||
|
||||
table.unique(['media_id', 'face_index']);
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.dropTable('media_biometrics');
|
||||
};
|
||||
15
migrations/20260726032348_stashes_archive.js
Normal file
15
migrations/20260726032348_stashes_archive.js
Normal file
@@ -0,0 +1,15 @@
|
||||
exports.up = async function(knex) {
|
||||
await knex.schema.alterTable('stashes', (table) => {
|
||||
table.boolean('archived')
|
||||
.notNullable()
|
||||
.defaultTo(false);
|
||||
|
||||
table.check('NOT ("primary" AND archived)', [], 'stashes_not_primary_and_archived');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.alterTable('stashes', (table) => {
|
||||
table.dropColumn('archived');
|
||||
});
|
||||
};
|
||||
302
package-lock.json
generated
302
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.254.4",
|
||||
"version": "1.255.11",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "traxxx",
|
||||
"version": "1.254.4",
|
||||
"version": "1.255.11",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@aws-sdk/client-s3": "^3.458.0",
|
||||
@@ -17,6 +17,7 @@
|
||||
"@graphile-contrib/pg-order-by-related": "^1.0.0",
|
||||
"@graphile-contrib/pg-simplify-inflector": "^6.1.0",
|
||||
"@graphile/pg-aggregates": "^0.1.1",
|
||||
"@rsc-parser/react-client": "^1.1.2",
|
||||
"@tensorflow/tfjs-node": "^4.22.0",
|
||||
"@vladmandic/human": "^3.3.6",
|
||||
"acorn": "^8.11.2",
|
||||
@@ -3808,149 +3809,6 @@
|
||||
"@jridgewell/sourcemap-codec": "^1.4.14"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp": {
|
||||
"version": "1.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz",
|
||||
"integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"detect-libc": "^2.0.0",
|
||||
"https-proxy-agent": "^5.0.0",
|
||||
"make-dir": "^3.1.0",
|
||||
"node-fetch": "^2.6.7",
|
||||
"nopt": "^5.0.0",
|
||||
"npmlog": "^5.0.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"semver": "^7.3.5",
|
||||
"tar": "^6.1.11"
|
||||
},
|
||||
"bin": {
|
||||
"node-pre-gyp": "bin/node-pre-gyp"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/https-proxy-agent": {
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz",
|
||||
"integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"agent-base": "6",
|
||||
"debug": "4"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">= 6"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/lru-cache": {
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
|
||||
"integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"yallist": "^4.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": {
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz",
|
||||
"integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"semver": "^6.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": {
|
||||
"version": "6.3.1",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
|
||||
"integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/node-fetch": {
|
||||
"version": "2.7.0",
|
||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"whatwg-url": "^5.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": "4.x || >=6.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"encoding": "^0.1.0"
|
||||
},
|
||||
"peerDependenciesMeta": {
|
||||
"encoding": {
|
||||
"optional": true
|
||||
}
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/semver": {
|
||||
"version": "7.5.4",
|
||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"lru-cache": "^6.0.0"
|
||||
},
|
||||
"bin": {
|
||||
"semver": "bin/semver.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/tr46": {
|
||||
"version": "0.0.3",
|
||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/webidl-conversions": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/whatwg-url": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"tr46": "~0.0.3",
|
||||
"webidl-conversions": "^3.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@mapbox/node-pre-gyp/node_modules/yallist": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
|
||||
"integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@nicolo-ribaudo/chokidar-2": {
|
||||
"version": "2.1.8-no-fsevents.3",
|
||||
"resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz",
|
||||
@@ -4204,6 +4062,11 @@
|
||||
"@redis/client": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/@rsc-parser/react-client": {
|
||||
"version": "1.1.2",
|
||||
"resolved": "https://registry.npmjs.org/@rsc-parser/react-client/-/react-client-1.1.2.tgz",
|
||||
"integrity": "sha512-IXW7ViicNACwI1vxAQgndtRKZlM9HgGpxSZdqnXn8fCY2VvUkqas03WuHv4LnVlCdC3HGwhbh3r3TBLxRrYSgw=="
|
||||
},
|
||||
"node_modules/@sinclair/typebox": {
|
||||
"version": "0.27.8",
|
||||
"resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz",
|
||||
@@ -6917,9 +6780,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/aws4": {
|
||||
"version": "1.12.0",
|
||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.12.0.tgz",
|
||||
"integrity": "sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==",
|
||||
"version": "1.13.2",
|
||||
"resolved": "https://registry.npmjs.org/aws4/-/aws4-1.13.2.tgz",
|
||||
"integrity": "sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/axe-core": {
|
||||
@@ -7771,22 +7634,6 @@
|
||||
}
|
||||
]
|
||||
},
|
||||
"node_modules/canvas": {
|
||||
"version": "2.11.2",
|
||||
"resolved": "https://registry.npmjs.org/canvas/-/canvas-2.11.2.tgz",
|
||||
"integrity": "sha512-ItanGBMrmRV7Py2Z+Xhs7cT+FNt5K0vPL4p9EZ/UX/Mu7hFbkxSjKF2KVtPwX7UYWp7dRKnrTvReflgrItJbdw==",
|
||||
"hasInstallScript": true,
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@mapbox/node-pre-gyp": "^1.0.0",
|
||||
"nan": "^2.17.0",
|
||||
"simple-get": "^3.0.3"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/cardboard-vr-display": {
|
||||
"version": "1.0.19",
|
||||
"resolved": "https://registry.npmjs.org/cardboard-vr-display/-/cardboard-vr-display-1.0.19.tgz",
|
||||
@@ -8814,19 +8661,6 @@
|
||||
"node": ">=0.10"
|
||||
}
|
||||
},
|
||||
"node_modules/decompress-response": {
|
||||
"version": "4.2.1",
|
||||
"resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",
|
||||
"integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"mimic-response": "^2.0.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
}
|
||||
},
|
||||
"node_modules/deep-is": {
|
||||
"version": "0.1.4",
|
||||
"resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
|
||||
@@ -9722,9 +9556,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/eslint-plugin-react-hooks": {
|
||||
"version": "4.6.0",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.0.tgz",
|
||||
"integrity": "sha512-oFc7Itz9Qxh2x4gNHStv3BqJq54ExXmfC+a1NjAta66IAN87Wu0R/QArgIS9qKzX3dXKPI9H5crl9QchNMY9+g==",
|
||||
"version": "4.6.2",
|
||||
"resolved": "https://registry.npmjs.org/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.6.2.tgz",
|
||||
"integrity": "sha512-QzliNJq4GinDBcD8gPB5v0wh6g8q3SUi6EFF0x8N/BL9PoVs0atuGc47ozMRyOWAKdwaZ5OnbOEa3WR+dSGKuQ==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
@@ -14015,19 +13849,6 @@
|
||||
"node": ">=6"
|
||||
}
|
||||
},
|
||||
"node_modules/mimic-response": {
|
||||
"version": "2.1.0",
|
||||
"resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",
|
||||
"integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/sponsors/sindresorhus"
|
||||
}
|
||||
},
|
||||
"node_modules/min-document": {
|
||||
"version": "2.19.0",
|
||||
"resolved": "https://registry.npmjs.org/min-document/-/min-document-2.19.0.tgz",
|
||||
@@ -18223,6 +18044,22 @@
|
||||
"node": ">= 0.8.0"
|
||||
}
|
||||
},
|
||||
"node_modules/prettier": {
|
||||
"version": "2.8.8",
|
||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz",
|
||||
"integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"prettier": "bin-prettier.js"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=10.13.0"
|
||||
},
|
||||
"funding": {
|
||||
"url": "https://github.com/prettier/prettier?sponsor=1"
|
||||
}
|
||||
},
|
||||
"node_modules/prettyjson": {
|
||||
"version": "1.2.5",
|
||||
"resolved": "https://registry.npmjs.org/prettyjson/-/prettyjson-1.2.5.tgz",
|
||||
@@ -19257,9 +19094,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/request/node_modules/qs": {
|
||||
"version": "6.5.3",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz",
|
||||
"integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==",
|
||||
"version": "6.5.5",
|
||||
"resolved": "https://registry.npmjs.org/qs/-/qs-6.5.5.tgz",
|
||||
"integrity": "sha512-mzR4sElr1bfCaPJe7m8ilJ6ZXdDaGoObcYR0ZHSsktM/Lt21MVHj5De30GQH2eiZ1qGRTO7LCAzQsUeXTNexWQ==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.6"
|
||||
@@ -19278,16 +19115,6 @@
|
||||
"node": ">=0.8"
|
||||
}
|
||||
},
|
||||
"node_modules/request/node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/require-directory": {
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
|
||||
@@ -20057,39 +19884,6 @@
|
||||
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
|
||||
"integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="
|
||||
},
|
||||
"node_modules/simple-concat": {
|
||||
"version": "1.0.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",
|
||||
"integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",
|
||||
"funding": [
|
||||
{
|
||||
"type": "github",
|
||||
"url": "https://github.com/sponsors/feross"
|
||||
},
|
||||
{
|
||||
"type": "patreon",
|
||||
"url": "https://www.patreon.com/feross"
|
||||
},
|
||||
{
|
||||
"type": "consulting",
|
||||
"url": "https://feross.org/support"
|
||||
}
|
||||
],
|
||||
"optional": true,
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/simple-get": {
|
||||
"version": "3.1.1",
|
||||
"resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",
|
||||
"integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",
|
||||
"optional": true,
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"decompress-response": "^4.2.0",
|
||||
"once": "^1.3.1",
|
||||
"simple-concat": "^1.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/simple-swizzle": {
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
|
||||
@@ -22230,6 +22024,16 @@
|
||||
"node": ">= 0.4.0"
|
||||
}
|
||||
},
|
||||
"node_modules/uuid": {
|
||||
"version": "3.4.0",
|
||||
"resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz",
|
||||
"integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==",
|
||||
"deprecated": "uuid@10 and below is no longer supported. For ESM codebases, update to uuid@latest. For CommonJS codebases, use uuid@11 (but be aware this version will likely be deprecated in 2028).",
|
||||
"peer": true,
|
||||
"bin": {
|
||||
"uuid": "bin/uuid"
|
||||
}
|
||||
},
|
||||
"node_modules/v-tooltip": {
|
||||
"version": "2.1.3",
|
||||
"resolved": "https://registry.npmjs.org/v-tooltip/-/v-tooltip-2.1.3.tgz",
|
||||
@@ -22242,23 +22046,27 @@
|
||||
}
|
||||
},
|
||||
"node_modules/v-tooltip/node_modules/@vue/compiler-sfc": {
|
||||
"version": "2.7.15",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.15.tgz",
|
||||
"integrity": "sha512-FCvIEevPmgCgqFBH7wD+3B97y7u7oj/Wr69zADBf403Tui377bThTjBvekaZvlRr4IwUAu3M6hYZeULZFJbdYg==",
|
||||
"version": "2.7.16",
|
||||
"resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.16.tgz",
|
||||
"integrity": "sha512-KWhJ9k5nXuNtygPU7+t1rX6baZeqOYLEforUPjgNDBnLicfHCoi48H87Q8XyLZOrNNsmhuwKqtpDQWjEFe6Ekg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@babel/parser": "^7.18.4",
|
||||
"@babel/parser": "^7.23.5",
|
||||
"postcss": "^8.4.14",
|
||||
"source-map": "^0.6.1"
|
||||
},
|
||||
"optionalDependencies": {
|
||||
"prettier": "^1.18.2 || ^2.0.0"
|
||||
}
|
||||
},
|
||||
"node_modules/v-tooltip/node_modules/vue": {
|
||||
"version": "2.7.15",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.15.tgz",
|
||||
"integrity": "sha512-a29fsXd2G0KMRqIFTpRgpSbWaNBK3lpCTOLuGLEDnlHWdjB8fwl6zyYZ8xCrqkJdatwZb4mGHiEfJjnw0Q6AwQ==",
|
||||
"version": "2.7.16",
|
||||
"resolved": "https://registry.npmjs.org/vue/-/vue-2.7.16.tgz",
|
||||
"integrity": "sha512-4gCtFXaAA3zYZdTp5s4Hl2sozuySsgz4jy1EnpBHNfpMa9dK1ZCG7viqBPCwXtmgc8nHqUsAu3G4gtmXkkY3Sw==",
|
||||
"deprecated": "Vue 2 has reached EOL and is no longer actively maintained. See https://v2.vuejs.org/eol/ for more details.",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@vue/compiler-sfc": "2.7.15",
|
||||
"@vue/compiler-sfc": "2.7.16",
|
||||
"csstype": "^3.1.0"
|
||||
}
|
||||
},
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "traxxx",
|
||||
"version": "1.254.4",
|
||||
"version": "1.255.11",
|
||||
"description": "All the latest porn releases in one place",
|
||||
"main": "src/app.js",
|
||||
"scripts": {
|
||||
@@ -76,6 +76,7 @@
|
||||
"@graphile-contrib/pg-order-by-related": "^1.0.0",
|
||||
"@graphile-contrib/pg-simplify-inflector": "^6.1.0",
|
||||
"@graphile/pg-aggregates": "^0.1.1",
|
||||
"@rsc-parser/react-client": "^1.1.2",
|
||||
"@tensorflow/tfjs-node": "^4.22.0",
|
||||
"@vladmandic/human": "^3.3.6",
|
||||
"acorn": "^8.11.2",
|
||||
|
||||
155
seeds/00_tags.js
155
seeds/00_tags.js
@@ -2,6 +2,10 @@ const upsert = require('../src/utils/upsert');
|
||||
const slugify = require('../src/utils/slugify');
|
||||
|
||||
const groups = [
|
||||
{
|
||||
slug: 'accessories',
|
||||
name: 'Accessories',
|
||||
},
|
||||
{
|
||||
slug: 'age',
|
||||
name: 'Age',
|
||||
@@ -95,6 +99,14 @@ const tags = [
|
||||
slug: '69',
|
||||
group: 'position',
|
||||
},
|
||||
{
|
||||
name: 'AI generated',
|
||||
slug: 'ai',
|
||||
},
|
||||
{
|
||||
name: 'AI enhanced',
|
||||
slug: 'aienhanced',
|
||||
},
|
||||
{
|
||||
name: 'airtight',
|
||||
slug: 'airtight',
|
||||
@@ -114,6 +126,7 @@ const tags = [
|
||||
{
|
||||
name: 'anal',
|
||||
slug: 'anal',
|
||||
rename: 'ass-fucking',
|
||||
description: 'Getting your asshole fucked. Generally considered naughtier, you may or may not find it a pleasurable alternative to vaginal sex.',
|
||||
group: 'penetration',
|
||||
},
|
||||
@@ -160,6 +173,7 @@ const tags = [
|
||||
name: 'ass to other girl\'s mouth',
|
||||
slug: 'atogm',
|
||||
description: '[Ass to mouth](/tag/atm) with a cock that has been in someone else\'s ass. ATOGM may also be the gay variation "ass to other guy\'s mouth".',
|
||||
implies: ['atm'],
|
||||
group: 'oral',
|
||||
},
|
||||
{
|
||||
@@ -321,6 +335,10 @@ const tags = [
|
||||
name: 'bondage',
|
||||
slug: 'bondage',
|
||||
},
|
||||
{
|
||||
name: 'bimbo',
|
||||
slug: 'bimbo',
|
||||
},
|
||||
{
|
||||
name: 'braces',
|
||||
slug: 'braces',
|
||||
@@ -554,8 +572,10 @@ const tags = [
|
||||
slug: 'electric-shock',
|
||||
},
|
||||
{
|
||||
name: 'enhanced boobs',
|
||||
slug: 'enhanced-boobs',
|
||||
name: 'fake tits',
|
||||
slug: 'fake-tits',
|
||||
description: 'Tasteful enhancements or bimbo bolt-ons, you don\'t mind a bit of plastic to get the boobs you\'ve always wanted.',
|
||||
rename: 'enhanced-boobs',
|
||||
},
|
||||
{
|
||||
name: 'enhanced butt',
|
||||
@@ -746,6 +766,11 @@ const tags = [
|
||||
slug: 'high-heels',
|
||||
group: 'clothing',
|
||||
},
|
||||
{
|
||||
name: 'hotel',
|
||||
slug: 'hotel',
|
||||
group: 'location',
|
||||
},
|
||||
{
|
||||
name: 'humiliation',
|
||||
slug: 'humiliation',
|
||||
@@ -842,13 +867,18 @@ const tags = [
|
||||
name: 'MFM threesome',
|
||||
slug: 'mfm',
|
||||
implies: ['threesome'],
|
||||
description: 'Two men fucking one woman, but not eachother. Typically involves a \'spitroast\', where one guy gets a blowjob and the other fucks her pussy or ass.',
|
||||
description: 'Two men fucking one woman, but not eachother. Typically involves a [spitroast](/tag/spitroast), where one guy gets a blowjob and the other fucks her pussy or ass.',
|
||||
group: 'group',
|
||||
},
|
||||
{
|
||||
name: 'spitroast',
|
||||
slug: 'spitroast',
|
||||
},
|
||||
{
|
||||
name: 'anal spitroast',
|
||||
slug: 'anal-spitroast',
|
||||
implies: ['anal', 'spitroast'],
|
||||
},
|
||||
{
|
||||
name: 'military',
|
||||
slug: 'military',
|
||||
@@ -868,8 +898,9 @@ const tags = [
|
||||
group: 'position',
|
||||
},
|
||||
{
|
||||
name: 'natural boobs',
|
||||
slug: 'natural-boobs',
|
||||
name: 'natural tits',
|
||||
slug: 'natural-tits',
|
||||
rename: 'natural-boobs',
|
||||
group: 'body',
|
||||
},
|
||||
{
|
||||
@@ -1237,10 +1268,40 @@ const tags = [
|
||||
slug: 'toy-dp',
|
||||
description: 'Getting [double penetrated](/tag/dp) with dildos, strap-ons or buttplugs. You can use both ends of a [double dildo](/tag/double-dildo) for a [double dildo DP](/tag/double-dildo-dp).',
|
||||
},
|
||||
{
|
||||
name: 'toy DVP',
|
||||
slug: 'toy-dvp',
|
||||
},
|
||||
{
|
||||
name: 'toy DAP',
|
||||
slug: 'toy-dap',
|
||||
},
|
||||
{
|
||||
name: 'toy TAP',
|
||||
slug: 'toy-tap',
|
||||
},
|
||||
{
|
||||
name: 'toy TVP',
|
||||
slug: 'toy-tvp',
|
||||
},
|
||||
{
|
||||
name: 'finger DP',
|
||||
slug: 'finger-dp',
|
||||
},
|
||||
{
|
||||
name: 'transsexual',
|
||||
slug: 'transsexual',
|
||||
},
|
||||
{
|
||||
name: 'trans man',
|
||||
slug: 'trans-man',
|
||||
description: 'A man who was assigned female at birth and has typically undergone a social transition, and may but not necessarily have had gender-affirming surgeries.',
|
||||
},
|
||||
{
|
||||
name: 'trans woman',
|
||||
slug: 'trans-woman',
|
||||
description: 'woman man who was assigned male at birth and has typically undergone a social transition, and may but not necessarily have had gender-affirming surgeries.',
|
||||
},
|
||||
{
|
||||
name: 'DA triple penetration',
|
||||
slug: 'da-tp',
|
||||
@@ -1434,6 +1495,16 @@ const tags = [
|
||||
name: 'pregnant',
|
||||
slug: 'pregnant',
|
||||
},
|
||||
{
|
||||
name: 'collar',
|
||||
slug: 'collar',
|
||||
group: 'accessories',
|
||||
},
|
||||
{
|
||||
name: 'choker',
|
||||
slug: 'choker',
|
||||
group: 'accessories',
|
||||
},
|
||||
];
|
||||
|
||||
const aliases = [
|
||||
@@ -1607,6 +1678,10 @@ const aliases = [
|
||||
name: 'mmf',
|
||||
for: 'mfm',
|
||||
},
|
||||
{
|
||||
name: 'threesome mmf',
|
||||
for: 'mfm',
|
||||
},
|
||||
{
|
||||
name: 'fmf',
|
||||
for: 'mff',
|
||||
@@ -1651,15 +1726,18 @@ const aliases = [
|
||||
name: 'big butts',
|
||||
for: 'big-butt',
|
||||
},
|
||||
{
|
||||
name: 'natural boobs',
|
||||
for: 'natural-tits',
|
||||
slug: 'natural-boobs',
|
||||
},
|
||||
{
|
||||
name: 'big natural tits',
|
||||
for: 'big-boobs',
|
||||
implies: ['natural-boobs'],
|
||||
},
|
||||
{
|
||||
name: 'big natural boobs',
|
||||
for: 'big-boobs',
|
||||
implies: ['natural-boobs'],
|
||||
},
|
||||
{
|
||||
name: 'big tits',
|
||||
@@ -1677,6 +1755,10 @@ const aliases = [
|
||||
name: 'busty - big boobs',
|
||||
for: 'big-boobs',
|
||||
},
|
||||
{
|
||||
name: 'big breasts',
|
||||
for: 'big-boobs',
|
||||
},
|
||||
{
|
||||
name: 'busty: big beautiful breast',
|
||||
for: 'big-boobs',
|
||||
@@ -1739,12 +1821,18 @@ const aliases = [
|
||||
},
|
||||
{
|
||||
name: 'fake boobs',
|
||||
for: 'enhanced-boobs',
|
||||
for: 'fake-tits',
|
||||
secondary: true,
|
||||
},
|
||||
{
|
||||
name: 'enhanced boobs',
|
||||
for: 'fake-tits',
|
||||
slug: 'enhanced-boobs',
|
||||
secondary: true,
|
||||
},
|
||||
{
|
||||
name: 'implants',
|
||||
for: 'enhanced-boobs',
|
||||
for: 'fake-tits',
|
||||
},
|
||||
{
|
||||
name: 'boob job',
|
||||
@@ -1752,7 +1840,7 @@ const aliases = [
|
||||
},
|
||||
{
|
||||
name: 'boobjob',
|
||||
for: 'enhanced-boobs',
|
||||
for: 'fake-tits',
|
||||
},
|
||||
{
|
||||
name: 'brown hair',
|
||||
@@ -2017,11 +2105,11 @@ const aliases = [
|
||||
},
|
||||
{
|
||||
name: 'enhanced',
|
||||
for: 'enhanced-boobs',
|
||||
for: 'fake-tits',
|
||||
},
|
||||
{
|
||||
name: 'enhanced tits',
|
||||
for: 'enhanced-boobs',
|
||||
for: 'fake-tits',
|
||||
},
|
||||
{
|
||||
name: 'fake butt',
|
||||
@@ -2064,11 +2152,6 @@ const aliases = [
|
||||
name: 'facial - multiple',
|
||||
for: 'facial',
|
||||
},
|
||||
{
|
||||
name: 'fake tits',
|
||||
for: 'enhanced-boobs',
|
||||
secondary: true,
|
||||
},
|
||||
{
|
||||
name: 'feet sex',
|
||||
for: 'foot-sex',
|
||||
@@ -2218,11 +2301,7 @@ const aliases = [
|
||||
},
|
||||
{
|
||||
name: 'natural',
|
||||
for: 'natural-boobs',
|
||||
},
|
||||
{
|
||||
name: 'natural tits',
|
||||
for: 'natural-boobs',
|
||||
for: 'natural-tits',
|
||||
},
|
||||
{
|
||||
name: 'natural butt',
|
||||
@@ -3109,7 +3188,7 @@ const aliases = [
|
||||
const priorities = [ // higher index is higher priority
|
||||
['blonde', 'brunette', 'black-hair', 'redhead'],
|
||||
['asian', 'black', 'latina', 'white', 'interracial'],
|
||||
['enhanced-boobs', 'natural-boobs'],
|
||||
['fake-tits', 'natural-tits'],
|
||||
['bts'],
|
||||
['blowjob', 'deepthroat', 'oil'],
|
||||
['toys', 'toy-anal', 'toy-dp', 'piss-drinking'],
|
||||
@@ -3119,7 +3198,7 @@ const priorities = [ // higher index is higher priority
|
||||
['facial', 'swallowing', 'creampie', 'anal-creampie', 'oral-creampie', 'cum-in-mouth', 'throatpie'],
|
||||
['lesbian', 'rough', 'milf', 'male-focus', 'bdsm', 'oil'],
|
||||
['threesome', 'mfm', 'mff', 'trainbang', 'pissing'],
|
||||
['anal', 'bukkake', 'spitroast'],
|
||||
['anal', 'bukkake', 'spitroast', 'anal-spitroast'],
|
||||
['dp', 'dap', 'triple-penetration', 'tap', 'dvp', 'tvp', 'airtight'],
|
||||
['blowbang', 'orgy'],
|
||||
['gangbang'],
|
||||
@@ -3135,6 +3214,33 @@ const priorities = [ // higher index is higher priority
|
||||
exports.seed = (knex) => Promise.resolve()
|
||||
.then(async () => upsert('tags_groups', groups, 'slug', knex))
|
||||
.then(async () => {
|
||||
await Promise.all(tags.map((async (tag) => {
|
||||
if (tag.rename) {
|
||||
await knex('tags')
|
||||
.where((builder) => {
|
||||
builder
|
||||
.where('slug', tag.slug)
|
||||
.orWhere('name', tag.name);
|
||||
})
|
||||
.whereNotNull('alias_for')
|
||||
.delete();
|
||||
|
||||
await knex('tags')
|
||||
.where('slug', tag.rename)
|
||||
.whereNull('alias_for')
|
||||
.update({
|
||||
name: tag.name,
|
||||
slug: tag.slug,
|
||||
});
|
||||
}
|
||||
|
||||
if (tag.delete) {
|
||||
await knex('tags')
|
||||
.where('slug', tag.rename)
|
||||
.delete();
|
||||
}
|
||||
})));
|
||||
|
||||
const groupEntries = await knex('tags_groups').select('*');
|
||||
const groupsMap = groupEntries.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
|
||||
@@ -3182,6 +3288,7 @@ exports.seed = (knex) => Promise.resolve()
|
||||
|
||||
return {
|
||||
name: alias.name,
|
||||
slug: alias.slug, // only used if redirect is required
|
||||
alias_for: tagsMap[alias.for],
|
||||
implied_tag_ids: alias.implies?.map((slug) => tagsMap[slug]),
|
||||
secondary: !!alias.secondary,
|
||||
|
||||
@@ -284,6 +284,7 @@ const networks = [
|
||||
areaId: '3b4c609c-6a0d-4cb9-9cce-0605f32b79ec',
|
||||
blockId: 114458,
|
||||
scene: 'https://aziani.com',
|
||||
api: 'https://azianistudios.com/tour_api.php',
|
||||
cdn: 'https://c75c0c3063.mjedge.net',
|
||||
},
|
||||
},
|
||||
@@ -593,6 +594,11 @@ const networks = [
|
||||
concurrency: 1,
|
||||
},
|
||||
},
|
||||
{
|
||||
slug: 'ksm',
|
||||
name: 'KSM',
|
||||
hasLogo: false,
|
||||
},
|
||||
{
|
||||
slug: 'letsdoeit',
|
||||
name: 'LetsDoeIt',
|
||||
@@ -621,6 +627,11 @@ const networks = [
|
||||
url: 'https://mamacitaz.com',
|
||||
parent: 'porndoe',
|
||||
},
|
||||
{
|
||||
slug: 'manyvids',
|
||||
name: 'ManyVids',
|
||||
url: 'https://www.manyvids.com',
|
||||
},
|
||||
{
|
||||
slug: 'men',
|
||||
name: 'Men',
|
||||
|
||||
@@ -6135,6 +6135,12 @@ const sites = [
|
||||
scene: false,
|
||||
},
|
||||
},
|
||||
// JAX SLAYHER
|
||||
{
|
||||
slug: 'jaxslayher',
|
||||
name: 'Jax Slayher',
|
||||
url: 'https://jaxslayher.com',
|
||||
},
|
||||
// JESSE LOADS MONSTER FACIALS
|
||||
{
|
||||
slug: 'jesseloadsmonsterfacials',
|
||||
@@ -7685,6 +7691,15 @@ const sites = [
|
||||
delete: true,
|
||||
parent: 'mamacitaz',
|
||||
},
|
||||
// MANYVIDS
|
||||
{
|
||||
name: 'nicoledoshi',
|
||||
slug: 'mv.nicoledoshi',
|
||||
url: 'https://nicoledoshi.manyvids.com',
|
||||
hasLogo: false,
|
||||
parent: 'manyvids',
|
||||
delete: true,
|
||||
},
|
||||
// MARISKA X
|
||||
{
|
||||
name: 'MariskaX',
|
||||
@@ -9471,6 +9486,12 @@ const sites = [
|
||||
url: 'https://shesbreedingmaterial.com',
|
||||
parent: 'nubiles',
|
||||
},
|
||||
{
|
||||
slug: 'glowingdesire',
|
||||
name: 'Glowing Desire',
|
||||
url: 'https://glowingdesire.com',
|
||||
parent: 'nubiles',
|
||||
},
|
||||
// PASCALS SUBSLUTS
|
||||
{
|
||||
slug: 'pascalssubsluts',
|
||||
@@ -10329,6 +10350,12 @@ const sites = [
|
||||
url: 'https://pornplus.com/series/pimpparade',
|
||||
parent: 'pornplus',
|
||||
},
|
||||
{
|
||||
name: 'Penis To Pussy Marketplace',
|
||||
slug: 'p2pmarketplace',
|
||||
url: 'https://pornplus.com/series/p2p-marketplace',
|
||||
parent: 'pornplus',
|
||||
},
|
||||
{
|
||||
name: 'Porn Pros',
|
||||
slug: 'pornprosplus',
|
||||
@@ -13502,6 +13529,27 @@ const sites = [
|
||||
},
|
||||
},
|
||||
},
|
||||
// SKM
|
||||
{
|
||||
slug: 'cosplayground',
|
||||
name: 'Cosplayground',
|
||||
url: 'https://cosplayground.com',
|
||||
tags: ['cosplay'],
|
||||
parent: 'ksm',
|
||||
independent: true,
|
||||
parameters: {
|
||||
// seems to use same CMS as Aziani
|
||||
api: 'https://api.cosplayground.com/tour_api.php',
|
||||
seriesId: null,
|
||||
areaId: '2bc2444e-a053-40a2-bc4b-ca3618521563',
|
||||
cdn: 'https://c880f36aa8.mjedge.net',
|
||||
entryIdSlug: true,
|
||||
videos: '/videos',
|
||||
scenePath: '/videos',
|
||||
modelPath: '/models',
|
||||
imageType: 'photos',
|
||||
},
|
||||
},
|
||||
// TEEN CORE CLUB
|
||||
{
|
||||
name: 'Analyzed Girls',
|
||||
|
||||
@@ -984,6 +984,8 @@ const tagMedia = [
|
||||
['mfm', 'hazel_moore_legalporno', 'Hazel Moore', 'analvids'],
|
||||
['mfm', 7, 'Rose Valerie', 'eurosexparties'],
|
||||
['mfm', 6, 'Honey Gold in "Slut Puppies 12"', 'julesjordan'],
|
||||
['threesome', 'dani_daniels_skin_diamond_hollyrandall_2', 'Dani Daniels, Skin Diamond and Erik Everhard in "Threesome Fun"', 'hollyrandall'],
|
||||
// ['threesome', 'dani_daniels_skin_diamond_hollyrandall', 'Dani Daniels, Skin Diamond and Erik Everhard in "Threesome Fun"', 'hollyrandall'],
|
||||
['natural-boobs', 1, 'Nia Nacci', 'firstclasspov'],
|
||||
['natural-boobs', 4, 'Miela (Marry Queen) in "Pure"', 'femjoy'],
|
||||
['natural-boobs', 7, 'Layla London', 'inthecrack'],
|
||||
@@ -1144,7 +1146,7 @@ exports.seed = (knex) => Promise.resolve()
|
||||
entity_id: entitiesBySlug[media.entitySlug]?.id,
|
||||
})), 'path', knex);
|
||||
|
||||
const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.id }), {});
|
||||
const tagIdsBySlug = tags.reduce((acc, tag) => ({ ...acc, [tag.slug]: tag.alias_for || tag.id }), {});
|
||||
const mediaIdsByPath = inserted.concat(updated).reduce((acc, item) => ({ ...acc, [item.path]: item.id }), {});
|
||||
|
||||
const tagMediaBySlug = tagMedia.reduce((acc, tagPhoto) => ({
|
||||
|
||||
58
seeds/09_manyvids.js
Normal file
58
seeds/09_manyvids.js
Normal file
@@ -0,0 +1,58 @@
|
||||
'use strict';
|
||||
|
||||
const unprint = require('unprint');
|
||||
const slugify = require('../src/utils/slugify');
|
||||
|
||||
const limit = Number(process.env.MV_LIMIT) || 1000;
|
||||
const sorting = process.env.MV_SORT || 'followers'; // followers, top, mostActive, newest, trending
|
||||
|
||||
async function fetchCreators(page = 1, acc = []) {
|
||||
console.log(`Fetching ${acc.length}/${limit} creators by ${sorting}`);
|
||||
|
||||
// size seems to be capped at 70
|
||||
const res = await unprint.get(`https://api.manyvids.com/search/creators/list?contentPref=1,2,3&sort=${sorting}&size=50&from=${(page - 1) * 50}`);
|
||||
|
||||
if (res.ok && res.data?.creators) {
|
||||
const creators = acc.concat(res.data.creators.map((creator) => ({
|
||||
name: creator.stageName,
|
||||
slug: `mv.${slugify(creator.slug, '')}`,
|
||||
url: `https://www.manyvids.com/Profile/${creator.id}/${creator.slug}/`,
|
||||
emblem: creator.avatar?.url || null,
|
||||
})));
|
||||
|
||||
if (creators.length >= limit) {
|
||||
return creators;
|
||||
}
|
||||
|
||||
return fetchCreators(page + 1, creators);
|
||||
}
|
||||
|
||||
return acc;
|
||||
}
|
||||
|
||||
exports.seed = async function (knex) {
|
||||
const channels = await fetchCreators();
|
||||
|
||||
const manyvidsNetwork = await knex('entities')
|
||||
.where('slug', 'manyvids')
|
||||
.where('type', 'network')
|
||||
.first();
|
||||
|
||||
if (!manyvidsNetwork) {
|
||||
throw new Error('ManyVids found, did the network migration run?');
|
||||
}
|
||||
|
||||
const result = await knex('entities')
|
||||
.insert(channels.map((channel) => ({
|
||||
name: channel.name,
|
||||
slug: channel.slug,
|
||||
url: channel.url,
|
||||
parent_id: manyvidsNetwork.id,
|
||||
has_logo: false,
|
||||
})))
|
||||
.onConflict(['slug', 'type'])
|
||||
.merge(['name', 'url'])
|
||||
.returning(knex.raw('(xmax = 0) as inserted'));
|
||||
|
||||
console.log(`Done! ${result.filter((row) => row.inserted).length}/${channels.length} ManyVids creators newly added as channels`);
|
||||
};
|
||||
@@ -214,6 +214,7 @@ function curateActor(actor, withDetails = false, isProfile = false) {
|
||||
name: actor.name,
|
||||
slug: actor.slug,
|
||||
url: actor.url,
|
||||
entryId: actor.entry_id,
|
||||
gender: actor.gender,
|
||||
orientation: actor.orientation,
|
||||
entityId: actor.entity_id,
|
||||
@@ -610,8 +611,15 @@ async function upsertProfiles(profiles) {
|
||||
media_id: profile.avatarMediaId,
|
||||
}));
|
||||
|
||||
if (avatars.length > 0) {
|
||||
await batchInsert('actors_avatars', avatars, { conflict: false });
|
||||
const resolvedAvatars = avatars.filter((avatar) => !!avatar.profile_id);
|
||||
const unresolvedAvatars = avatars.filter((avatar) => !avatar.profile_id);
|
||||
|
||||
unresolvedAvatars.forEach((avatar) => {
|
||||
logger.warn(`Skipping avatar for actor ${avatar.actor_id} (${avatar.media_id}), no profile could be resolved`);
|
||||
});
|
||||
|
||||
if (resolvedAvatars.length > 0) {
|
||||
await batchInsert('actors_avatars', resolvedAvatars, { conflict: false });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -693,7 +701,7 @@ async function scrapeProfiles(actor, sources, entitiesBySlug, existingProfilesBy
|
||||
}
|
||||
}), Promise.reject(new Error()));
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
// console.log(error);
|
||||
|
||||
if (error.code !== 'PROFILE_NOT_AVAILABLE') {
|
||||
logger.error(`Failed to fetch profile for '${actor.name}': ${error.message}`);
|
||||
@@ -980,6 +988,7 @@ async function getOrCreateActors(baseActors, batchId) {
|
||||
...actor,
|
||||
actorId,
|
||||
update: profileIdsByActorIdAndEntityId[actorId]?.[actor.entity?.id],
|
||||
profileId: profileIdsByActorIdAndEntityId[actorId]?.[actor.entity?.id],
|
||||
};
|
||||
})
|
||||
.filter((actor) => !!actor.actorId)
|
||||
|
||||
283
src/alerts.js
283
src/alerts.js
@@ -1,283 +0,0 @@
|
||||
'use strict';
|
||||
|
||||
const escapeRegexp = require('escape-string-regexp');
|
||||
|
||||
const argv = require('./argv');
|
||||
const logger = require('./logger')(__filename);
|
||||
const knex = require('./knex');
|
||||
const { indexApi } = require('./manticore');
|
||||
const bulkInsert = require('./utils/bulk-insert');
|
||||
const { HttpError } = require('./errors');
|
||||
|
||||
async function addAlert(alert, sessionUser) {
|
||||
if (!sessionUser) {
|
||||
throw new HttpError('You are not authenthicated', 401);
|
||||
}
|
||||
|
||||
if ((!alert.actors || alert.actors.length === 0) && (!alert.tags || alert.tags.length === 0) && (!alert.entities || alert.entities.length === 0) && (!alert.matches || alert.matches.length === 0)) {
|
||||
throw new HttpError('Alert must contain at least one actor, tag or entity', 400);
|
||||
}
|
||||
|
||||
if (alert.matches?.some((match) => !match.property || !match.expression)) {
|
||||
throw new HttpError('Match must define a property and an expression', 400);
|
||||
}
|
||||
|
||||
const [{ id: alertId }] = await knex('alerts')
|
||||
.insert({
|
||||
user_id: sessionUser.id,
|
||||
notify: alert.notify,
|
||||
email: alert.email,
|
||||
all: alert.all,
|
||||
})
|
||||
.returning('id');
|
||||
|
||||
await Promise.all([
|
||||
alert.actors?.length > 0 && bulkInsert('alerts_actors', alert.actors.map((actorId) => ({
|
||||
alert_id: alertId,
|
||||
actor_id: actorId,
|
||||
})), false),
|
||||
alert.tags?.length > 0 && bulkInsert('alerts_tags', alert.tags.map((tagId) => ({
|
||||
alert_id: alertId,
|
||||
tag_id: tagId,
|
||||
})), false),
|
||||
alert.matches?.length > 0 && bulkInsert('alerts_matches', alert.matches.map((match) => ({
|
||||
alert_id: alertId,
|
||||
property: match.property,
|
||||
expression: /\/.*\//.test(match.expression)
|
||||
? match.expression.slice(1, -1)
|
||||
: escapeRegexp(match.expression),
|
||||
})), false),
|
||||
alert.stashes?.length > 0 && bulkInsert('alerts_stashes', alert.stashes.map((stashId) => ({
|
||||
alert_id: alertId,
|
||||
stash_id: stashId,
|
||||
})), false),
|
||||
alert.entities && bulkInsert('alerts_entities', alert.entities.map((entityId) => ({
|
||||
alert_id: alertId,
|
||||
entity_id: entityId,
|
||||
})).slice(0, alert.all ? 1 : Infinity), false), // one scene can never match multiple entities in AND mode
|
||||
]);
|
||||
|
||||
return alertId;
|
||||
}
|
||||
|
||||
async function removeAlert(alertId) {
|
||||
await knex('alerts').where('id', alertId).delete();
|
||||
}
|
||||
|
||||
async function notify(scenes) {
|
||||
if (argv.showcased === false) {
|
||||
logger.info(`Skipping notify for ${scenes.length} scenes because showcase flag is disabled.`);
|
||||
return [];
|
||||
}
|
||||
|
||||
const sceneIds = scenes.map((scene) => scene.id);
|
||||
|
||||
const [
|
||||
releasesActors,
|
||||
releasesTags,
|
||||
rawAlerts,
|
||||
alertsActors,
|
||||
alertsTags,
|
||||
alertsEntities,
|
||||
alertsMatches,
|
||||
alertsStashes,
|
||||
] = await Promise.all([
|
||||
knex('releases_actors').whereIn('release_id', sceneIds),
|
||||
knex('releases_tags').whereIn('release_id', sceneIds),
|
||||
knex('alerts'),
|
||||
knex('alerts_actors'),
|
||||
knex('alerts_tags'),
|
||||
knex('alerts_entities'),
|
||||
knex('alerts_matches'),
|
||||
knex('alerts_stashes'),
|
||||
]);
|
||||
|
||||
const actorIdsByReleaseId = releasesActors.reduce((acc, releaseActor) => {
|
||||
if (!acc[releaseActor.release_id]) {
|
||||
acc[releaseActor.release_id] = [];
|
||||
}
|
||||
|
||||
acc[releaseActor.release_id].push(releaseActor.actor_id);
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const tagIdsByReleaseId = releasesTags.reduce((acc, releaseTag) => {
|
||||
if (!acc[releaseTag.release_id]) {
|
||||
acc[releaseTag.release_id] = [];
|
||||
}
|
||||
|
||||
acc[releaseTag.release_id].push(releaseTag.tag_id);
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const alertsActorsByAlertId = alertsActors.reduce((acc, alertActor) => { if (!acc[alertActor.alert_id]) { acc[alertActor.alert_id] = []; } acc[alertActor.alert_id].push(alertActor.actor_id); return acc; }, {});
|
||||
const alertsTagsByAlertId = alertsTags.reduce((acc, alertTag) => { if (!acc[alertTag.alert_id]) { acc[alertTag.alert_id] = []; } acc[alertTag.alert_id].push(alertTag.tag_id); return acc; }, {});
|
||||
const alertsEntitiesByAlertId = alertsEntities.reduce((acc, alertEntity) => { if (!acc[alertEntity.alert_id]) { acc[alertEntity.alert_id] = []; } acc[alertEntity.alert_id].push(alertEntity.entity_id); return acc; }, {});
|
||||
const alertsStashesByAlertId = alertsStashes.reduce((acc, alertStash) => { if (!acc[alertStash.alert_id]) { acc[alertStash.alert_id] = []; } acc[alertStash.alert_id].push(alertStash.stash_id); return acc; }, {});
|
||||
|
||||
const alertsMatchesByAlertId = alertsMatches.reduce((acc, alertMatch) => {
|
||||
if (!acc[alertMatch.alert_id]) {
|
||||
acc[alertMatch.alert_id] = [];
|
||||
}
|
||||
|
||||
acc[alertMatch.alert_id].push({
|
||||
property: alertMatch.property,
|
||||
expression: new RegExp(alertMatch.expression, 'ui'),
|
||||
});
|
||||
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
const alerts = rawAlerts.map((alert) => ({
|
||||
id: alert.id,
|
||||
userId: alert.user_id,
|
||||
notify: alert.notify,
|
||||
email: alert.email,
|
||||
all: alert.all,
|
||||
allActors: alert.all_actors,
|
||||
allEntities: alert.all_entities,
|
||||
allTags: alert.all_tags,
|
||||
allMatches: alert.all_matches,
|
||||
actors: alertsActorsByAlertId[alert.id] || [],
|
||||
tags: alertsTagsByAlertId[alert.id] || [],
|
||||
entities: alertsEntitiesByAlertId[alert.id] || [],
|
||||
matches: alertsMatchesByAlertId[alert.id] || [],
|
||||
stashes: alertsStashesByAlertId[alert.id] || [],
|
||||
}));
|
||||
|
||||
const curatedScenes = scenes.map((scene) => ({
|
||||
id: scene.id,
|
||||
title: scene.title,
|
||||
description: scene.description,
|
||||
actorIds: actorIdsByReleaseId[scene.id] || [],
|
||||
tagIds: tagIdsByReleaseId[scene.id] || [],
|
||||
entityId: scene.entity.id,
|
||||
parentEntityId: scene.entity.parent?.id,
|
||||
}));
|
||||
|
||||
const triggers = alerts.flatMap((alert) => {
|
||||
const alertScenes = curatedScenes.filter((scene) => {
|
||||
if (alert.all) {
|
||||
if (alert.actors.length > 0 && !alert.actors[alert.allActors ? 'every' : 'some']((actorId) => scene.actorIds.includes(actorId))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (alert.tags.length > 0 && !alert.tags[alert.allTags ? 'every' : 'some']((tagId) => scene.tagIds.includes(tagId))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// multiple entities can only be matched in OR mode
|
||||
if (alert.entities.length > 0 && !alert.entities.some((alertEntityId) => alertEntityId === scene.entityId || alertEntityId === scene.parentEntityId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (alert.matches.length > 0 && !alert.matches[alert.allMatches ? 'every' : 'some']((match) => match.expression.test(scene[match.property]))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
if (alert.matches.length > 0 && alert.actors[alert.allActors ? 'every' : 'some']((actorId) => scene.actorIds.includes(actorId))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (alert.tags.length > 0 && alert.tags[alert.allTags ? 'every' : 'some']((tagId) => scene.tagIds.includes(tagId))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// multiple entities can only be matched in OR mode
|
||||
if (alert.entities.length > 0 && alert.entities.some((alertEntityId) => alertEntityId === scene.entityId || alertEntityId === scene.parentEntityId)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (alert.matches.length > 0 && alert.matches[alert.allMatches ? 'every' : 'some']((match) => match.expression.test(scene[match.property]))) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
return alertScenes.map((scene) => ({
|
||||
sceneId: scene.id,
|
||||
alert,
|
||||
}));
|
||||
});
|
||||
|
||||
const notifications = Object.values(Object.fromEntries(triggers // prevent multiple notifications for the same scene
|
||||
.filter((trigger) => trigger.alert.notify)
|
||||
.map((trigger) => [`${trigger.alert.userId}:${trigger.sceneId}`, trigger])))
|
||||
.map((trigger) => ({
|
||||
user_id: trigger.alert.userId,
|
||||
alert_id: trigger.alert.id,
|
||||
scene_id: trigger.sceneId,
|
||||
}));
|
||||
|
||||
const uniqueStashes = Object.values(Object.fromEntries(triggers.flatMap((trigger) => trigger.alert.stashes.map((stashId) => ({
|
||||
stashId,
|
||||
sceneId: trigger.sceneId,
|
||||
userId: trigger.alert.userId,
|
||||
}))).map((stash) => [`${stash.stashId}:${stash.sceneId}`, stash])));
|
||||
|
||||
const stashEntries = uniqueStashes.map((stash) => ({
|
||||
scene_id: stash.sceneId,
|
||||
stash_id: stash.stashId,
|
||||
}));
|
||||
|
||||
const [stashed] = await Promise.all([
|
||||
bulkInsert('stashes_scenes', stashEntries, false),
|
||||
bulkInsert('notifications', notifications, false),
|
||||
]);
|
||||
|
||||
// we need created_at from the databased, but user_id is not returned. it's easier to query it than to try and merge it with the input data
|
||||
const stashedEntries = await knex('stashes_scenes')
|
||||
.select('stashes_scenes.*', 'stashes.user_id')
|
||||
.leftJoin('stashes', 'stashes.id', 'stashes_scenes.stash_id')
|
||||
.whereIn('stashes_scenes.id', stashed.map((stash) => stash.id));
|
||||
|
||||
const docs = stashedEntries.map((stash) => ({
|
||||
replace: {
|
||||
index: 'scenes_stashed',
|
||||
id: stash.id,
|
||||
doc: {
|
||||
scene_id: stash.scene_id,
|
||||
user_id: stash.user_id,
|
||||
stash_id: stash.stash_id,
|
||||
created_at: Math.round(stash.created_at.getTime() / 1000),
|
||||
},
|
||||
},
|
||||
}));
|
||||
|
||||
if (docs.length > 0) {
|
||||
await indexApi.bulk(docs.map((doc) => JSON.stringify(doc)).join('\n'));
|
||||
}
|
||||
|
||||
return triggers;
|
||||
}
|
||||
|
||||
async function updateNotification(notificationId, notification, sessionUser) {
|
||||
await knex('notifications')
|
||||
.where('user_id', sessionUser.id)
|
||||
.where('id', notificationId)
|
||||
.update({
|
||||
seen: notification.seen,
|
||||
});
|
||||
}
|
||||
|
||||
async function updateNotifications(notification, sessionUser) {
|
||||
await knex('notifications')
|
||||
.where('user_id', sessionUser.id)
|
||||
.update({
|
||||
seen: notification.seen,
|
||||
});
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
addAlert,
|
||||
removeAlert,
|
||||
notify,
|
||||
updateNotification,
|
||||
updateNotifications,
|
||||
};
|
||||
@@ -252,7 +252,12 @@ async function init() {
|
||||
const storedMovies = await storeMovies(deepMovies, storedScenes[0]?.batchId);
|
||||
const storedMovieScenes = await storeScenes(deepMovieScenes, storedScenes[0]?.batchId);
|
||||
|
||||
await associateMovieScenes(storedMovies, [...storedScenes, ...storedMovieScenes]);
|
||||
const allScenes = [...storedScenes, ...storedMovieScenes];
|
||||
|
||||
await associateMovieScenes(storedMovies, allScenes);
|
||||
|
||||
await updateSceneSearch(allScenes.map((scene) => scene.id));
|
||||
await updateMovieSearch(storedMovies.map((movie) => movie.id));
|
||||
}
|
||||
|
||||
logger.info(`Completed in ${Object.entries(intervalToDuration({ start: startTime, end: Date.now() }))
|
||||
|
||||
@@ -23,6 +23,7 @@ const hitzefrei = require('./hitzefrei');
|
||||
const hookuphotshot = require('./hookuphotshot');
|
||||
const hush = require('./hush');
|
||||
const inthecrack = require('./inthecrack');
|
||||
const jaxslayher = require('./jaxslayher');
|
||||
const julesjordan = require('./julesjordan');
|
||||
const karups = require('./karups');
|
||||
const kellymadison = require('./kellymadison');
|
||||
@@ -33,6 +34,7 @@ const pornbox = require('./pornbox');
|
||||
const littlecapricedreams = require('./littlecapricedreams');
|
||||
const loveherfilms = require('./loveherfilms');
|
||||
const bluedonkeymedia = require('./bluedonkeymedia');
|
||||
const manyvids = require('./manyvids');
|
||||
const mikeadriano = require('./mikeadriano');
|
||||
const aylo = require('./aylo');
|
||||
const missax = require('./missax');
|
||||
@@ -205,14 +207,6 @@ module.exports = {
|
||||
jerkaoke: modelmedia,
|
||||
modelmediaasia: modelmedia,
|
||||
delphine: modelmedia,
|
||||
// etc
|
||||
'18vr': badoink,
|
||||
theflourishxxx: theflourish,
|
||||
pierrewoodman,
|
||||
exploitedx, // only from known URL that will specify site
|
||||
fullpornnetwork,
|
||||
adultempire,
|
||||
allherluv: missax,
|
||||
// americanpornstar,
|
||||
angelogodshackoriginal,
|
||||
babevr: badoink,
|
||||
@@ -230,6 +224,7 @@ module.exports = {
|
||||
hitzefrei,
|
||||
hookuphotshot,
|
||||
inthecrack,
|
||||
jaxslayher,
|
||||
karups,
|
||||
boyfun: karups,
|
||||
kellymadison,
|
||||
@@ -281,4 +276,14 @@ module.exports = {
|
||||
slayed: vixen,
|
||||
wifey: vixen,
|
||||
vrcosplayx: badoink,
|
||||
// etc
|
||||
'18vr': badoink,
|
||||
theflourishxxx: theflourish,
|
||||
cosplayground: aziani,
|
||||
pierrewoodman,
|
||||
exploitedx, // only from known URL that will specify site
|
||||
fullpornnetwork,
|
||||
adultempire,
|
||||
allherluv: missax,
|
||||
manyvids,
|
||||
};
|
||||
|
||||
@@ -6,11 +6,13 @@ const { decode } = require('html-entities');
|
||||
const slugify = require('../utils/slugify');
|
||||
const { feetInchesToCm, femaleFeetUsToEu } = require('../utils/convert');
|
||||
|
||||
const tagKeys = ['tags', 'category', 'categories'];
|
||||
|
||||
function scrapeScene(data, channel, parameters) {
|
||||
const release = {};
|
||||
|
||||
release.entryId = data.cms_set_id;
|
||||
release.url = `${parameters.scene || channel.url}/video/${data.cms_set_id}`;
|
||||
release.url = `${parameters.scene || channel.url}${parameters.scenePath || '/video'}/${parameters.entryIdSlug ? data.slug : data.cms_set_id}`;
|
||||
|
||||
release.title = data.name;
|
||||
release.description = data.description;
|
||||
@@ -20,7 +22,7 @@ function scrapeScene(data, channel, parameters) {
|
||||
|
||||
release.actors = data.data_types.find((dataType) => dataType.data_type === 'Models' || dataType.data_type === 'Talent')?.data_values.map((actor) => ({
|
||||
name: actor.name,
|
||||
url: `${channel.url}/model/${actor.cms_data_value_id}?models=${encodeURI(actor.name)}`, // slug does not work unless it's also the ID
|
||||
url: `${channel.url}${parameters.modelPath || '/model'}/${parameters.entryIdSlug && actor.slug ? actor.slug : actor.cms_data_value_id}?models=${encodeURI(actor.name)}`, // slug does not work unless it's also the ID
|
||||
}));
|
||||
|
||||
release.directors = data.data_types.find((dataType) => dataType.data_type === 'Videographers')?.data_values.map((director) => ({
|
||||
@@ -29,7 +31,7 @@ function scrapeScene(data, channel, parameters) {
|
||||
}));
|
||||
|
||||
release.tags = data.data_types
|
||||
.filter((dataType) => dataType.data_type === 'Tags' || dataType.data_type === 'Category')
|
||||
.filter((dataType) => tagKeys.includes(dataType.data_type?.toLowerCase()))
|
||||
.flatMap((tags) => tags.data_values.map((tag) => tag.name));
|
||||
|
||||
const poster = data.preview_formatted.thumb;
|
||||
@@ -43,7 +45,7 @@ function scrapeScene(data, channel, parameters) {
|
||||
.map((key) => unprint.prefixUrl(`${poster[key][0].fileuri}?${poster[key][0].signature}`, parameters.cdn));
|
||||
}
|
||||
|
||||
release.caps = data.content
|
||||
release[parameters.imageType || 'caps'] = data.content
|
||||
?.filter((item) => item.content_type === 'image' && item.content?.[0])
|
||||
.map((item) => [
|
||||
item.content[0],
|
||||
@@ -66,13 +68,14 @@ function scrapeScene(data, channel, parameters) {
|
||||
release.trailer = unprint.prefixUrl(`${trailer.fileuri}?${trailer.signature}`, parameters.cdn);
|
||||
}
|
||||
|
||||
release.channel = slugify(data.data_types.find((dataType) => dataType.data_type === 'Series')?.data_values[0]?.name, '');
|
||||
release.channel = slugify(data.data_types.find((dataType) => dataType.data_type === 'Series')?.data_values[0]?.name, '') || null;
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
async function getBlockId(slug, dataSource, entity, parameters) {
|
||||
const res = await unprint.get(`https://azianistudios.com/tour_api.php/content/page?slug=${slug}&data_source=${JSON.stringify(dataSource)}`, {
|
||||
const res = await unprint.get(`${parameters.api || 'https://azianistudios.com/tour_api.php'}/content/page?slug=${slug}&data_source=${JSON.stringify(dataSource)}`, {
|
||||
interface: 'request', // necessary for KSM/Cosplayground CF wall, ok for Aziani
|
||||
headers: {
|
||||
Referer: entity.url,
|
||||
'x-nats-cms-area-id': parameters.areaId,
|
||||
@@ -109,9 +112,10 @@ async function fetchLatest(channel, page = 1, { parameters }) {
|
||||
data_type_search: parameters.seriesId && JSON.stringify({ 7: parameters.seriesId.toString() }), // doesn't seem relevant
|
||||
}).toString();
|
||||
|
||||
const url = `https://azianistudios.com/tour_api.php/content/sets?${query}`;
|
||||
const url = `${parameters.api || 'https://azianistudios.com/tour_api.php'}/content/sets?${query}`;
|
||||
|
||||
const res = await unprint.get(url, {
|
||||
interface: 'request', // necessary for KSM/Cosplayground CF wall, ok for Aziani
|
||||
headers: {
|
||||
Referer: channel.url,
|
||||
'x-nats-cms-area-id': parameters.areaId,
|
||||
@@ -126,20 +130,21 @@ async function fetchLatest(channel, page = 1, { parameters }) {
|
||||
}
|
||||
|
||||
async function fetchScene(url, entity, _baseRelease, { parameters }) {
|
||||
const entryId = new URL(url).pathname.match(/\/video\/(\w+)/)[1];
|
||||
const entryId = new URL(url).pathname.match(/\/videos?\/([\w-]+)/)[1];
|
||||
|
||||
if (!entryId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const blockId = await getBlockId('/video/:id', entryId, entity, parameters);
|
||||
const blockId = await getBlockId(`${parameters.videos || '/video'}/${parameters.entryIdSlug ? ':slug' : ':id'}`, entryId, entity, parameters);
|
||||
|
||||
if (!blockId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams({
|
||||
cms_set_ids: entryId,
|
||||
cms_set_ids: parameters.entryIdSlug ? '' : entryId,
|
||||
...parameters.entryIdSlug ? { slug: entryId } : null,
|
||||
cms_area_id: parameters.areaId,
|
||||
cms_block_id: blockId,
|
||||
content: 1,
|
||||
@@ -150,9 +155,10 @@ async function fetchScene(url, entity, _baseRelease, { parameters }) {
|
||||
content_count: 1,
|
||||
}).toString();
|
||||
|
||||
const apiUrl = `https://azianistudios.com/tour_api.php/content/sets?${query}`;
|
||||
const apiUrl = `${parameters.api || 'https://azianistudios.com/tour_api.php'}/content/sets?${query}`;
|
||||
|
||||
const res = await unprint.get(apiUrl, {
|
||||
interface: 'request', // necessary for KSM/Cosplayground CF wall, ok for Aziani
|
||||
headers: {
|
||||
Referer: entity.url,
|
||||
'x-nats-cms-area-id': parameters.areaId,
|
||||
@@ -174,14 +180,18 @@ function scrapeProfile(data, entity, parameters) {
|
||||
decode(detail.value || detail.content_formatted || detail.content),
|
||||
]));
|
||||
|
||||
profile.url = `${entity.url}/model/${data.cms_data_value_id}`;
|
||||
profile.url = `${entity.url}/model/${parameters.entryIdSlug ? data.slug : data.cms_data_value_id}`;
|
||||
profile.entryId = data.cms_data_value_id;
|
||||
|
||||
profile.description = data.description;
|
||||
|
||||
profile.gender = bio.gender?.toLowerCase();
|
||||
profile.age = bio.age;
|
||||
profile.dateOfBirth = unprint.extractDate(`${bio.born} 0`, 'MMMM Do YYYY', { match: /\w+ \d+\w{2} \d{1,4}/ });
|
||||
profile.dateOfBirth = unprint.extractDate(`${bio.born} 0`, 'MMMM Do YYYY', { match: /\w+ \d+\w{2} \d{1,4}/ })
|
||||
|| unprint.extractDate(bio.date_of_birth, 'yyyy-MM-dd');
|
||||
|
||||
profile.birthPlace = bio.birthplace;
|
||||
profile.ethnicity = bio.ethnicity;
|
||||
|
||||
profile.measurements = bio.measurements;
|
||||
profile.height = feetInchesToCm(bio.height);
|
||||
@@ -190,7 +200,9 @@ function scrapeProfile(data, entity, parameters) {
|
||||
profile.hairColor = bio.hair_color;
|
||||
profile.eyeColor = bio.eye_color;
|
||||
|
||||
const avatar = bio.thumbnail?.image[0];
|
||||
const avatar = bio.thumbnail?.image?.[0] // aziani
|
||||
|| bio.biopic?.image?.[0] // cosplayground profile
|
||||
|| bio.headshot?.image?.[0]; // cosplayground headshot
|
||||
|
||||
if (avatar) {
|
||||
profile.avatar = {
|
||||
@@ -201,36 +213,41 @@ function scrapeProfile(data, entity, parameters) {
|
||||
};
|
||||
}
|
||||
|
||||
profile.socials = [bio.onlyfans, bio.instagram].filter(Boolean);
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchProfile({ name, url }, { entity, parameters }) {
|
||||
if (!url) {
|
||||
// no easy search option
|
||||
if (!url && !parameters.entryIdSlug) {
|
||||
// no easy search option and numeric ID is non-derivable
|
||||
return null;
|
||||
}
|
||||
|
||||
const actorId = new URL(url).pathname.match(/model\/(\d+)/)[1];
|
||||
const actorId = url && new URL(url).pathname.match(/models?\/(\d+)/)?.[1];
|
||||
|
||||
if (!actorId) {
|
||||
if (!actorId && !parameters.entryIdSlug) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const blockId = await getBlockId('/model/:id', { models: name, id: actorId }, entity, parameters);
|
||||
const slug = slugify(name);
|
||||
const blockId = await getBlockId(`${parameters.modelPath || '/model'}/${parameters.entryIdSlug ? ':slug' : 'id'}`, { models: name, id: actorId, slug }, entity, parameters);
|
||||
|
||||
if (!blockId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const query = new URLSearchParams({
|
||||
cms_data_value_ids: actorId,
|
||||
cms_data_value_ids: actorId || '',
|
||||
...parameters.entryIdSlug ? { slug } : null,
|
||||
cms_block_id: blockId,
|
||||
cms_data_type_id: 4,
|
||||
}).toString();
|
||||
|
||||
const apiUrl = `https://azianistudios.com/tour_api.php/content/data-values?${query}`;
|
||||
const apiUrl = `${parameters.api || 'https://azianistudios.com/tour_api.php'}/content/data-values?${query}`;
|
||||
|
||||
const res = await unprint.get(apiUrl, {
|
||||
interface: 'request', // necessary for KSM/Cosplayground CF wall, ok for Aziani
|
||||
headers: {
|
||||
Referer: entity.url,
|
||||
'x-nats-cms-area-id': entity.parameters.areaId,
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
'use strict';
|
||||
|
||||
const unprint = require('unprint');
|
||||
const cookie = require('cookie');
|
||||
|
||||
const slugify = require('../utils/slugify');
|
||||
|
||||
@@ -54,16 +53,14 @@ function scrapeAll(scenes, channel) {
|
||||
|
||||
async function beforeFetchLatest(channel) {
|
||||
// scene page only seems to accept language preferences from session
|
||||
const { res } = await unprint.get(`${channel.url}/en/news-videos-x-marc-dorcel`, {
|
||||
const { cookies } = await unprint.get(`${channel.url}/en/news-videos-x-marc-dorcel`, {
|
||||
headers: {
|
||||
'X-Requested-With': 'XMLHttpRequest',
|
||||
'Accept-Language': 'en-US,en', // fetch English rather than French titles
|
||||
},
|
||||
});
|
||||
|
||||
const sessionCookie = cookie.parse(res.headers['set-cookie'][0])?.dorcelclub;
|
||||
|
||||
return `dorcelclub=${sessionCookie}`;
|
||||
return `dorcelclub=${cookies.dorcelclub}`;
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1, _options, { beforeFetchLatest: sessionCookie }) {
|
||||
|
||||
257
src/scrapers/jaxslayher.js
Executable file
257
src/scrapers/jaxslayher.js
Executable file
@@ -0,0 +1,257 @@
|
||||
'use strict';
|
||||
|
||||
const unprint = require('unprint');
|
||||
|
||||
const slugify = require('../utils/slugify');
|
||||
const { convert } = require('../utils/convert');
|
||||
const tryUrls = require('../utils/try-urls');
|
||||
|
||||
// parse Next/React data tree
|
||||
async function parsePayload(rawText) {
|
||||
const { createFlightResponse, processBinaryChunk } = await import('@rsc-parser/react-client'); // eslint-disable-line import/no-unresolved
|
||||
|
||||
const response = createFlightResponse(false);
|
||||
const bytes = new TextEncoder().encode(rawText);
|
||||
|
||||
processBinaryChunk(response, bytes);
|
||||
|
||||
return response._chunks;
|
||||
}
|
||||
|
||||
function traverseData(node, predicate, resultDepth = 3, seen = new WeakSet(), ancestors = []) {
|
||||
if (node === null || typeof node !== 'object') {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (seen.has(node)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
seen.add(node);
|
||||
|
||||
if (predicate(node)) {
|
||||
if (resultDepth === 0) {
|
||||
return node;
|
||||
}
|
||||
|
||||
const index = ancestors.length - resultDepth;
|
||||
|
||||
return ancestors[Math.max(index, 0)] ?? node;
|
||||
}
|
||||
|
||||
const values = Array.isArray(node) ? node : Object.values(node);
|
||||
const nextAncestors = [...ancestors, node];
|
||||
|
||||
let result = null;
|
||||
|
||||
values.some((value) => {
|
||||
result = traverseData(value, predicate, resultDepth, seen, nextAncestors);
|
||||
return result !== null;
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function getPoster(videoId, channel) {
|
||||
if (!videoId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
`${channel.origin}/images/updates/${videoId}-1280.jpg`,
|
||||
`${channel.origin}/images/updates/${videoId}-720.jpg`,
|
||||
`${channel.origin}/images/updates/${videoId}.jpg`, // 502px
|
||||
`${channel.origin}/images/updates/${videoId}-360.jpg`,
|
||||
];
|
||||
}
|
||||
|
||||
function getVideo(videoId, path = '/trailers', channel) {
|
||||
if (!videoId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return [
|
||||
`${channel.origin}${path}/${videoId}.mp4`,
|
||||
`${channel.origin}${path}/${videoId}-med.mp4`,
|
||||
];
|
||||
}
|
||||
|
||||
function scrapeAll(scenes, channel) {
|
||||
return scenes.map((data) => {
|
||||
const release = {};
|
||||
|
||||
release.url = `${channel.origin}/tour/video/${data.slug}`;
|
||||
release.entryId = data.id; // URL slugs are not unique, some pages on original site unreachable!
|
||||
|
||||
release.attributes = {
|
||||
dataEntryId: data.id, // not used in URL, store as secondary
|
||||
slug: data.slug,
|
||||
};
|
||||
|
||||
release.title = data.title;
|
||||
release.date = new Date(data.release_date);
|
||||
|
||||
release.actors = data.models.map((model) => ({
|
||||
name: model.name,
|
||||
url: `${channel.origin}/tour/model/${slugify(model.slug)}`, // for some reason they are underscored, while URL expects dashes
|
||||
}));
|
||||
|
||||
release.tags = data.tags.map((tag) => tag.tag_name);
|
||||
|
||||
release.poster = getPoster(data.id, channel);
|
||||
|
||||
release.teaser = getVideo(data.id, '/video_thumbs', channel);
|
||||
release.trailer = getVideo(data.id, '/trailers', channel);
|
||||
|
||||
return release;
|
||||
});
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
// HTML does not contain tags, hence we jump through hoops to fetch the data directly
|
||||
const res = await unprint.get(`${channel.origin}/tour/videos/most-recent/page/${page}.txt`, {
|
||||
headers: {
|
||||
rsc: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
const payload = await parsePayload(res.body);
|
||||
const sceneData = traverseData(payload, (item) => item.content_type === 'video');
|
||||
|
||||
if (sceneData) {
|
||||
return scrapeAll(sceneData.map((item) => item.props.item), channel);
|
||||
}
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
function scrapeScene(payload, { url, channel, baseRelease }) {
|
||||
const release = {};
|
||||
|
||||
const sceneData = traverseData(payload, (item) => Object.hasOwn(item, 'videoID'), 2);
|
||||
const durationData = traverseData(sceneData, (item) => /\d{2}:\d{2}:\d{2}/.test(item.children), 0);
|
||||
const videoData = traverseData(sceneData, (item) => Object.hasOwn(item, 'videoID'), 0);
|
||||
const dateData = traverseData(sceneData, (item) => item.children?.includes?.('2026'), 0);
|
||||
|
||||
const videoId = videoData?.videoID;
|
||||
|
||||
release.duration = unprint.extractDuration(durationData?.children);
|
||||
|
||||
if (baseRelease?.entryId) {
|
||||
// base release data is much more concise, duration only thing missing
|
||||
return release;
|
||||
}
|
||||
|
||||
release.entryId = videoId;
|
||||
|
||||
release.attributes = {
|
||||
dataEntryId: videoId,
|
||||
slug: new URL(url).pathname.match(/\/video\/([\w-]+)/)?.[1],
|
||||
};
|
||||
|
||||
release.title = videoData?.title;
|
||||
release.date = unprint.extractDate(dateData.children, 'MMM DD/YYYY', { match: null });
|
||||
|
||||
release.poster = getPoster(videoId, channel);
|
||||
release.teaser = getVideo(videoId, '/video_thumbs', channel);
|
||||
release.trailer = getVideo(videoId, '/trailers', channel);
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
async function fetchScene(url, channel, baseRelease) {
|
||||
const dataUrl = `${url.replace(/\/*$/, '')}.txt`;
|
||||
|
||||
const res = await unprint.get(dataUrl, {
|
||||
headers: {
|
||||
rsc: 1,
|
||||
},
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
const payload = await parsePayload(res.body);
|
||||
|
||||
return scrapeScene(payload, { url, channel, baseRelease });
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
function getBioItem(bioData, key) {
|
||||
if (!bioData) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const data = traverseData(bioData, (item) => typeof item.children === 'string' && item.children.toLowerCase() === `${key}:`, 2);
|
||||
const values = data[1]?.props.children;
|
||||
|
||||
const value = Array.isArray(values)
|
||||
? values.find((itemValue) => (typeof itemValue === 'string' ? itemValue.trim() : itemValue))
|
||||
: values;
|
||||
|
||||
if (value && String(value).toLowerCase() !== 'n/a') {
|
||||
return value;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
function scrapeProfile(payload, actorName, channel, url) {
|
||||
const profile = { url };
|
||||
|
||||
const actorData = traverseData(payload, (item) => slugify(item.name) === slugify(actorName), 0);
|
||||
const bioData = traverseData(payload, (item) => item.className === 'description_main', 0);
|
||||
const descriptionData = traverseData(payload, (item) => item.className === 'description_top', 0);
|
||||
const description = traverseData(descriptionData, (item) => item.className === 'info', 0)?.children;
|
||||
|
||||
profile.entryId = actorData?.id;
|
||||
|
||||
profile.birthPlace = getBioItem(bioData, 'born');
|
||||
|
||||
profile.dateOfBirth = getBioItem(bioData, 'birthdate');
|
||||
profile.age = getBioItem(bioData, 'age');
|
||||
|
||||
profile.eyes = getBioItem(bioData, 'eyes');
|
||||
profile.hairColor = getBioItem(bioData, 'hair');
|
||||
profile.weight = convert(getBioItem(bioData, 'weight'), 'lb', 'kg');
|
||||
profile.height = convert(getBioItem(bioData, 'height'), 'cm');
|
||||
profile.measurements = getBioItem(bioData, 'measurements');
|
||||
|
||||
if (!/no bio available/i.test(description)) {
|
||||
profile.description = description;
|
||||
}
|
||||
|
||||
if (actorData.is_thumbed && actorData.id) {
|
||||
profile.avatar = [
|
||||
`${channel.origin}/images/models/${actorData.id}.jpg`, // 628px
|
||||
`${channel.origin}/images/models/${actorData.id}-516.jpg`,
|
||||
`${channel.origin}/images/models/${actorData.id}-408.jpg`,
|
||||
`${channel.origin}/images/models/${actorData.id}-300.jpg`,
|
||||
];
|
||||
}
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchProfile({ name: actorName, url: actorUrl }, entity) {
|
||||
const { res, url } = await tryUrls([
|
||||
actorUrl && `${actorUrl}.txt`,
|
||||
`${entity.url}/tour/model/${slugify(actorName, '-')}.txt`,
|
||||
]);
|
||||
|
||||
if (res.ok) {
|
||||
const payload = await parsePayload(res.body);
|
||||
|
||||
return scrapeProfile(payload, actorName, entity, url.replace(/\.txt$/, ''));
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
fetchLatest,
|
||||
fetchProfile,
|
||||
fetchScene,
|
||||
};
|
||||
@@ -5,7 +5,6 @@ const unprint = require('unprint');
|
||||
// const { parse } = require('csv-parse/sync');
|
||||
|
||||
const slugify = require('../utils/slugify');
|
||||
const http = require('../utils/http');
|
||||
const { feetInchesToCm, femaleFeetUsToEu } = require('../utils/convert');
|
||||
|
||||
const thumbKeyRegex = /(thumb\d+_url)|(episode_thumb_image_\d+_url)/;
|
||||
@@ -84,14 +83,14 @@ function scrapeSceneApi(data, channel, parameters) {
|
||||
|
||||
async function fetchLatestApi(channel, page = 1, { parameters }) {
|
||||
// JSON API doesn't return poster images, CSV API doesn't have pagination. UPDATE: requested and received both, yet to test
|
||||
const res = await http.get(`${parameters.apiAddress}/affiliates?site_id=${parameters.siteId}&page=${page}`, {
|
||||
const res = await unprint.get(`${parameters.apiAddress}/affiliates?site_id=${parameters.siteId}&page=${page}`, {
|
||||
headers: {
|
||||
Authorization: `Bearer ${config.apiKeys[parameters.apiKey]}`,
|
||||
},
|
||||
});
|
||||
|
||||
if (res.ok) {
|
||||
return res.body.data.map((data) => scrapeSceneApi(data, channel, parameters));
|
||||
return res.data.data.map((data) => scrapeSceneApi(data, channel, parameters));
|
||||
}
|
||||
|
||||
return res.status;
|
||||
|
||||
241
src/scrapers/manyvids.js
Executable file
241
src/scrapers/manyvids.js
Executable file
@@ -0,0 +1,241 @@
|
||||
'use strict';
|
||||
|
||||
const unprint = require('unprint');
|
||||
|
||||
const slugify = require('../utils/slugify');
|
||||
|
||||
function splitTag(tag) {
|
||||
return tag
|
||||
.replace(/([a-z])([A-Z])/g, '$1 $2')
|
||||
.replace(/([A-Z]+)([A-Z][a-z])/g, '$1 $2') // handle sequence of caps
|
||||
.toLowerCase()
|
||||
.trim();
|
||||
}
|
||||
|
||||
async function getTrailer(videoId) {
|
||||
if (!videoId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const res = await unprint.get(`https://api.manyvids.com/store/video/${videoId}/private`);
|
||||
|
||||
if (res.ok && res.data?.statusCode === 200) {
|
||||
return res.data.data.teaser.filepath;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/*
|
||||
function getModelUrl(modelData) {
|
||||
const slug = modelData.slug || modelData.profileUrl?.match(/\/profile\/\d+\/(\w+)/i)?.[1] || null;
|
||||
|
||||
if (slug) {
|
||||
return `https://${slug}.manyvids.com`;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
*/
|
||||
|
||||
async function scrapeScene(data, context) {
|
||||
const release = {};
|
||||
|
||||
release.url = data.url
|
||||
? `https://www.manyvids.com${data.url}`
|
||||
: `https://www.manyvids.com/Video/${data.id}/${data.slug || ''}`;
|
||||
|
||||
release.entryId = data.id;
|
||||
|
||||
release.attributes = {
|
||||
price: data.price?.regular,
|
||||
discount: data.price?.discountedPrice,
|
||||
isCustomOrder: data.isCustomOrder,
|
||||
isPremium: data.isPremium,
|
||||
isPrivate: data.isPrivate,
|
||||
isExclusive: data.isExclusive,
|
||||
isStreamOnly: data.isStreamOnly,
|
||||
};
|
||||
|
||||
release.title = data.title;
|
||||
release.description = data.description;
|
||||
|
||||
release.date = new Date(data.launchDate);
|
||||
release.duration = unprint.extractDuration(data.duration || data.videoDuration);
|
||||
|
||||
/* many channels operate more like a studio than a performer, so the channel information doesn't represent a person
|
||||
const model = data.creator || data.model;
|
||||
|
||||
release.actors = [{
|
||||
name: model.stageName || model.displayName,
|
||||
entryId: model.id,
|
||||
avatar: model.avatar?.url || model.avatar,
|
||||
url: getModelUrl(model),
|
||||
}];
|
||||
*/
|
||||
|
||||
release.tags = [
|
||||
data.is3D && '3d',
|
||||
data.isAiGenerated && 'ai',
|
||||
...data.tagList?.map((tag) => splitTag(tag.label)) || [],
|
||||
].filter(Boolean);
|
||||
|
||||
release.poster = data.thumbnail?.url || data.screenshot || data.thumbnail; // thumbnail URL is full size, thumbnail direct is thumb sized
|
||||
|
||||
if (data.preview?.url) {
|
||||
release.trailer = data.preview?.url;
|
||||
} else if (context.includeTrailers) {
|
||||
release.trailer = await getTrailer(data.id);
|
||||
}
|
||||
|
||||
release.qualities = [data.height].filter(Boolean);
|
||||
|
||||
return release;
|
||||
}
|
||||
|
||||
const profileIdRegex = /\/profile\/(\d+)/i;
|
||||
|
||||
async function getProfileId(channel) {
|
||||
if (channel.url) {
|
||||
const { hostname, pathname } = new URL(channel.url);
|
||||
|
||||
if (profileIdRegex.test(pathname)) { // full profile URL
|
||||
const urlProfileId = new URL(channel.url).pathname.match(profileIdRegex)?.[1];
|
||||
|
||||
if (urlProfileId) {
|
||||
return urlProfileId;
|
||||
}
|
||||
}
|
||||
|
||||
if (/[\w-]+.manyvids.com/.test(hostname)) { // short profile URL
|
||||
const idRes = await unprint.request(channel.url, {
|
||||
method: 'head',
|
||||
followRedirects: 0,
|
||||
});
|
||||
|
||||
const profileId = idRes.headers.get('location')?.match(profileIdRegex)?.[1];
|
||||
|
||||
if (profileId) {
|
||||
return profileId;
|
||||
}
|
||||
}
|
||||
|
||||
// sadly we can't reliably reconstruct short profile URL from the slug
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
const profileId = await getProfileId(channel);
|
||||
|
||||
if (profileId) {
|
||||
const res = await unprint.get(`https://api.manyvids.com/store/videos/${profileId}?sort=newest&limit=100&page=${page}`);
|
||||
|
||||
if (res.ok && res.data?.statusCode === 200) {
|
||||
return Promise.all(res.data.data.map(async (data) => scrapeScene(data, channel)));
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function fetchScene(url, channel, baseRelease, context) {
|
||||
const videoId = new URL(url).pathname.match(/\/video\/(\d+)/i)?.[1];
|
||||
|
||||
if (!videoId) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const res = await unprint.get(`https://api.manyvids.com/store/video/${videoId}`);
|
||||
|
||||
if (res.ok && res.data?.statusCode === 200) {
|
||||
return scrapeScene(res.data.data, {
|
||||
channel,
|
||||
includeTrailers: context.includeTrailers,
|
||||
isDeep: !!baseRelease.entryId,
|
||||
});
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
function scrapeProfile(data) {
|
||||
const profile = {};
|
||||
|
||||
profile.description = [data.bio, data.description].filter(Boolean).join(' | ') || null;
|
||||
|
||||
profile.placeOfResidence = data.location || null;
|
||||
profile.ethnicity = data.ethnicity || null;
|
||||
profile.hairColor = data.hairColor || null;
|
||||
|
||||
profile.gender = data.identification?.toLowerCase() || null;
|
||||
profile.orientation = data.orientation;
|
||||
|
||||
profile.avatar = data.avatar || null;
|
||||
profile.photos = [data.portrait].filter(Boolean);
|
||||
|
||||
profile.socials = [data.socLinkTwitter, data.socLinkInstagram, data.socLinkReddit].filter(Boolean);
|
||||
|
||||
const dateOfBirth = data.dob && unprint.extractDate(data.dob);
|
||||
|
||||
if (dateOfBirth && new Date().getFullYear() - dateOfBirth.getFullYear() > 18) {
|
||||
// date of births that would not be legal are likely bogus
|
||||
profile.dateOfBirth = dateOfBirth;
|
||||
}
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function getActorUrl(actor) {
|
||||
if (actor.url) {
|
||||
const idRes = await unprint.request(actor.url, {
|
||||
method: 'head',
|
||||
followRedirects: 0,
|
||||
});
|
||||
|
||||
const profileId = idRes.headers.get('location')?.match(profileIdRegex)?.[1];
|
||||
|
||||
if (profileId) {
|
||||
return `https://api.manyvids.com/profile/profile/${profileId}`;
|
||||
}
|
||||
}
|
||||
|
||||
const res = await unprint.get(`https://api.manyvids.com/search/autocomplete?keywords=${slugify(actor.name, '+')}`);
|
||||
|
||||
if (res.ok) {
|
||||
const model = res.data?.models?.find((modelResult) => modelResult.stage_name === actor.name || modelResult.username === actor.name);
|
||||
|
||||
if (model) {
|
||||
const profileId = model.url?.match(/\/profile\/(\d+)/i)?.[1];
|
||||
|
||||
if (profileId) {
|
||||
return `https://api.manyvids.com/profile/profile/${profileId}`;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
async function fetchProfile(actor, entity) {
|
||||
const actorUrl = await getActorUrl(actor);
|
||||
|
||||
if (actorUrl) {
|
||||
const res = await unprint.get(actorUrl);
|
||||
|
||||
if (res.ok && res.data?.username) {
|
||||
return scrapeProfile(res.data, entity);
|
||||
}
|
||||
|
||||
return res.status;
|
||||
}
|
||||
|
||||
return actorUrl;
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
fetchLatest,
|
||||
fetchProfile,
|
||||
fetchScene,
|
||||
};
|
||||
@@ -26,9 +26,11 @@ async function getPhotos(albumUrl) {
|
||||
selectAll: '.photo-thumb',
|
||||
});
|
||||
|
||||
return res.ok
|
||||
? res.context.map(({ query }) => unprint.prefixUrl(query.element('source').srcset))
|
||||
: [];
|
||||
if (res.ok) {
|
||||
return res.context.map(({ query }) => query.sourceSet('source, picture img')).filter(Boolean);
|
||||
}
|
||||
|
||||
return [];
|
||||
}
|
||||
|
||||
function scrapeAll(scenes, entity) {
|
||||
@@ -37,7 +39,7 @@ function scrapeAll(scenes, entity) {
|
||||
|
||||
release.title = query.content('.title a');
|
||||
release.url = stripQuery(unprint.prefixUrl(query.url('.title a'), entity.url));
|
||||
release.entryId = Number(new URL(release.url).pathname.match(/\/watch\/(\d+)/)[1]);
|
||||
release.entryId = Number(new URL(release.url).pathname.match(/\/(?:watch|stream)\/(\d+)/)[1]);
|
||||
|
||||
release.date = query.date('.date', 'MMM D, YYYY');
|
||||
|
||||
@@ -51,7 +53,8 @@ function scrapeAll(scenes, entity) {
|
||||
release.actors = query.content('.models', { trim: false })?.trim().split(/\s{2,}/);
|
||||
}
|
||||
|
||||
const poster = query.sourceSet('img', 'data-srcset')?.[0];
|
||||
const poster = query.sourceSet('img', 'data-srcset')?.[0]
|
||||
|| query.sourceSet('img', 'data-src')?.[0];
|
||||
|
||||
release.poster = poster && [
|
||||
poster.replace('_640', '_1280'),
|
||||
|
||||
@@ -32,6 +32,7 @@ const hush = require('./hush');
|
||||
const innofsin = require('./innofsin');
|
||||
const insex = require('./insex');
|
||||
const inthecrack = require('./inthecrack');
|
||||
const jaxslayher = require('./jaxslayher');
|
||||
const jesseloadsmonsterfacials = require('./jesseloadsmonsterfacials');
|
||||
const julesjordan = require('./julesjordan');
|
||||
const karups = require('./karups');
|
||||
@@ -43,6 +44,7 @@ const pornbox = require('./pornbox');
|
||||
const littlecapricedreams = require('./littlecapricedreams');
|
||||
const loveherfilms = require('./loveherfilms');
|
||||
const bluedonkeymedia = require('./bluedonkeymedia');
|
||||
const manyvids = require('./manyvids');
|
||||
const mikeadriano = require('./mikeadriano');
|
||||
const aylo = require('./aylo');
|
||||
const missax = require('./missax');
|
||||
@@ -100,6 +102,7 @@ module.exports = {
|
||||
acam,
|
||||
analvids: pornbox,
|
||||
pornbox,
|
||||
cosplayground: aziani,
|
||||
kellymadison,
|
||||
kink,
|
||||
'8kmembers': kellymadison,
|
||||
@@ -145,9 +148,11 @@ module.exports = {
|
||||
julesjordan,
|
||||
karups,
|
||||
// etc.
|
||||
jaxslayher,
|
||||
littlecapricedreams,
|
||||
loveherfilms,
|
||||
mamacitaz: porndoe,
|
||||
manyvids,
|
||||
mariskax,
|
||||
mikeadriano,
|
||||
missax,
|
||||
|
||||
@@ -23,9 +23,13 @@ function scrapeScene(data, channel) {
|
||||
release.tags = data.tags;
|
||||
|
||||
release.poster = [data.trailer_screencap].concat(data.extra_thumbnails);
|
||||
release.photos = data.previews?.full
|
||||
.map((url) => [url, url.replace('full/', 'thumbs/')]) // photos
|
||||
.concat(data.thumbs); // screenshots
|
||||
|
||||
// inconsistent data structure. if there is an album, it's previews: { full: [...] }, if it's empty, it's previews: []
|
||||
if (Array.isArray(data.previews?.full)) {
|
||||
release.photos = data.previews?.full
|
||||
.map((url) => [url, url.replace('full/', 'thumbs/')]) // photos
|
||||
.concat(data.thumbs); // screenshots
|
||||
}
|
||||
|
||||
release.trailer = data.trailer_url;
|
||||
release.teaser = data.special_thumbnails;
|
||||
@@ -36,30 +40,6 @@ function scrapeScene(data, channel) {
|
||||
return release;
|
||||
}
|
||||
|
||||
function scrapeProfile(data, scenes, entity) {
|
||||
const profile = {};
|
||||
|
||||
profile.entryId = data.id;
|
||||
profile.url = qu.prefixUrl(`/models/${data.slug}`, entity.url);
|
||||
|
||||
profile.description = data.Bio || data.bio;
|
||||
profile.birthPlace = data.Born || data.born;
|
||||
profile.dateOfBirth = qu.parseDate(data.Birthdate || data.birthdate, 'YYYY-MM-DD');
|
||||
|
||||
profile.measurements = data.Measurements || data.Measurements;
|
||||
profile.height = feetInchesToCm(data.Height || data.height);
|
||||
profile.weight = lbsToKg(data.Weight || data.weight);
|
||||
|
||||
profile.eyes = data.Eyes || data.eyes;
|
||||
profile.hairColor = data.Hair || data.hair;
|
||||
|
||||
profile.avatar = data.thumb;
|
||||
|
||||
profile.scenes = scenes?.map((scene) => scrapeScene(scene, entity));
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchLatest(channel, page = 1) {
|
||||
const url = `${channel.url}/videos?order_by=publish_date&per_page=100&page=${page}`; // unsure if page works, not enough videos as of 2022-05-29
|
||||
const res = await qu.get(url);
|
||||
@@ -102,6 +82,30 @@ async function fetchScene(url, channel, baseRelease) {
|
||||
return res.status;
|
||||
}
|
||||
|
||||
function scrapeProfile(data, scenes, entity) {
|
||||
const profile = {};
|
||||
|
||||
profile.entryId = data.id;
|
||||
profile.url = qu.prefixUrl(`/models/${data.slug}`, entity.url);
|
||||
|
||||
profile.description = data.Bio || data.bio;
|
||||
profile.birthPlace = data.Born || data.born;
|
||||
profile.dateOfBirth = qu.parseDate(data.Birthdate || data.birthdate, 'YYYY-MM-DD');
|
||||
|
||||
profile.measurements = data.Measurements || data.Measurements;
|
||||
profile.height = feetInchesToCm(data.Height || data.height);
|
||||
profile.weight = lbsToKg(data.Weight || data.weight);
|
||||
|
||||
profile.eyes = data.Eyes || data.eyes;
|
||||
profile.hairColor = data.Hair || data.hair;
|
||||
|
||||
profile.avatar = data.thumb;
|
||||
|
||||
profile.scenes = scenes?.map((scene) => scrapeScene(scene, entity));
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
async function fetchProfile({ slug }, entity) {
|
||||
const url = `${entity.url}/models/${slug}`;
|
||||
const res = await qu.get(url);
|
||||
|
||||
@@ -10,9 +10,12 @@ const dateRegex = /\d{4}-\d{2}-\d{2}T/;
|
||||
function scrapeLatest(scenes, fullData, channel, parameters) {
|
||||
return scenes.map(({ query }) => {
|
||||
const release = {};
|
||||
const origin = new URL(parameters.latest || channel.url).origin;
|
||||
|
||||
release.url = query.url('[href*="/video"]', { origin: new URL(parameters.latest || channel.url).origin });
|
||||
release.title = query.content('a[href*="/video"] strong');
|
||||
release.url = query.url('a[href*="/video"]', { origin })
|
||||
|| query.url('nuxtlink[to*="/video"]', { attribute: 'to', origin });
|
||||
|
||||
release.title = query.content('a[href*="/video"] strong, nuxtlink[to*="/video"] strong');
|
||||
|
||||
release.entryId = release.url
|
||||
? new URL(release.url).pathname.split('/').at(-1)
|
||||
|
||||
@@ -17,8 +17,6 @@ const { associateActors, associateDirectors, scrapeActors, toBaseActors } = requ
|
||||
const { associateReleaseTags } = require('./tags');
|
||||
const { curateEntity } = require('./entities');
|
||||
const { associateReleaseMedia } = require('./media');
|
||||
const { updateSceneSearch, updateMovieSearch } = require('./update-search');
|
||||
const { notify } = require('./alerts');
|
||||
|
||||
const geoCommon = import('../common/geo.mjs'); // eslint-disable-line import/extensions, import/no-relative-packages
|
||||
|
||||
@@ -345,7 +343,8 @@ async function associateMovieScenes(movies, movieScenes) {
|
||||
|
||||
await bulkInsert('movies_scenes', associations, false);
|
||||
|
||||
await updateSceneSearch(movieScenes.map((scene) => scene.id));
|
||||
// movieScenes includes scenes that are not associated to any movies, don't update those (again)
|
||||
// await updateSceneSearch(associations.map((association) => association.scene_id));
|
||||
}
|
||||
|
||||
async function associateSerieScenes(series, serieScenes) {
|
||||
@@ -392,7 +391,7 @@ async function storeMovies(movies, useBatchId) {
|
||||
const moviesWithId = attachReleaseIds(movies, storedMovies);
|
||||
|
||||
await associateReleaseTags(moviesWithId, 'movie');
|
||||
await updateMovieSearch(moviesWithId.map((movie) => movie.id));
|
||||
// await updateMovieSearch(moviesWithId.map((movie) => movie.id));
|
||||
|
||||
await associateReleaseMedia(moviesWithId, 'movie');
|
||||
|
||||
@@ -420,7 +419,8 @@ async function storeSeries(series, useBatchId) {
|
||||
const storedSeries = await bulkInsert('series', curatedSerieEntries, ['entity_id', 'entry_id'], true);
|
||||
const seriesWithId = attachReleaseIds(series, storedSeries);
|
||||
|
||||
await updateMovieSearch(seriesWithId.map((serie) => serie.id), 'serie');
|
||||
// TODO: the movie search function doesn't accept a second parameter, and we don't currently have a series search index at all; re-evaluate what actually needs to happen here
|
||||
// await updateMovieSearch(seriesWithId.map((serie) => serie.id), 'serie');
|
||||
await associateReleaseMedia(seriesWithId, 'serie');
|
||||
|
||||
return seriesWithId;
|
||||
@@ -490,7 +490,7 @@ async function storeScenes(releases, useBatchId) {
|
||||
await associateDirectors(releasesWithId, batchId); // some directors may also be actors, don't associate at the same time
|
||||
}
|
||||
|
||||
await updateSceneSearch(releasesWithId.map((release) => release.id));
|
||||
// await updateSceneSearch(releasesWithId.map((release) => release.id));
|
||||
|
||||
// media is more error-prone, associate separately
|
||||
await associateReleaseMedia(releasesWithId);
|
||||
@@ -503,8 +503,6 @@ async function storeScenes(releases, useBatchId) {
|
||||
|
||||
logger.info(`Stored ${storedReleaseEntries.length}, updated ${updated} releases`);
|
||||
|
||||
await notify(releasesWithId);
|
||||
|
||||
return releasesWithId;
|
||||
}
|
||||
|
||||
@@ -512,6 +510,4 @@ module.exports = {
|
||||
associateMovieScenes,
|
||||
storeScenes,
|
||||
storeMovies,
|
||||
updateSceneSearch,
|
||||
updateMovieSearch,
|
||||
};
|
||||
|
||||
@@ -10,7 +10,7 @@ async function syncWeb(domain, ids) {
|
||||
return;
|
||||
}
|
||||
|
||||
await knex('sync').insert({ domain, item_ids: ids });
|
||||
await knex('sync').insert({ domain, item_ids: Array.from(new Set(ids)) });
|
||||
|
||||
if (config.webApi.enabled) {
|
||||
await unprint.post(`${config.webApi.address}/sync`, null, {
|
||||
|
||||
@@ -265,6 +265,8 @@ const actors = [
|
||||
{ entity: 'tokyohot', name: 'Mai Kawana', url: 'https://my.tokyo-hot.com/cast/2099/', fields: ['avatar', 'birthPlace', 'height', 'cup', 'bust', 'waist', 'hip', 'hairStyle', 'shoeSize', 'bloodType'] },
|
||||
{ entity: 'wakeupnfuck', name: 'Abby Lee Brazil', fields: ['avatar', 'nationality'] },
|
||||
{ entity: 'darkkotv', name: 'Aidra Fox', fields: ['avatar', 'description', 'dateOfBirth', 'birthPlace', 'ethnicity', 'height', 'weight', 'measurements', 'naturalBoobs', 'hasTattoos', 'hasPiercings'] },
|
||||
{ entity: 'jaxslayher', name: 'Eliza Ibarra', fields: ['avatar', 'description', 'eyes', 'height', 'weight', 'birthPlace', 'measurements', 'hairColor'] },
|
||||
{ entity: 'cosplayground', name: 'Anna Claire Clouds', url: 'https://cosplayground.com/models/anna-claire-clouds?models=Anna%20Claire%20Clouds', fields: ['avatar', 'description', 'dateOfBirth', 'birthPlace', 'height', 'measurements', 'hairColor', 'ethnicity'] },
|
||||
];
|
||||
|
||||
const actorScrapers = scrapers.actors;
|
||||
|
||||
Reference in New Issue
Block a user