Adding networks and sites as entities,
This commit is contained in:
@@ -430,7 +430,7 @@ const networks = [
|
||||
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const { inserted, updated } = await upsert('networks', parentNetworks, 'slug', knex);
|
||||
const { inserted, updated } = await upsert('entities', parentNetworks, 'slug', knex);
|
||||
const parentNetworksBySlug = [].concat(inserted, updated).reduce((acc, network) => ({ ...acc, [network.slug]: network.id }), {});
|
||||
|
||||
const networksWithParent = networks.map(network => ({
|
||||
@@ -443,5 +443,5 @@ exports.seed = knex => Promise.resolve()
|
||||
parent_id: parentNetworksBySlug[network.parent] || null,
|
||||
}));
|
||||
|
||||
return upsert('networks', networksWithParent, 'slug', knex);
|
||||
return upsert('entities', networksWithParent, 'slug', knex);
|
||||
});
|
||||
|
||||
@@ -1158,7 +1158,7 @@ const sites = [
|
||||
url: 'https://www.sunlustxxx.com',
|
||||
description: '',
|
||||
network: 'blowpass',
|
||||
show: true, // site offline, use only for indexing old scenes
|
||||
active: true, // site offline, use only for indexing old scenes
|
||||
},
|
||||
// BOOBPEDIA
|
||||
{
|
||||
@@ -1877,7 +1877,7 @@ const sites = [
|
||||
description: 'Welcome the official Daring Sex site, home of high quality erotica, sensual porn and hardcore exploration of the darker side of sexuality. Here you will find a variety of videos for lovers looking for a bit of extra, or something darker with an element of control.',
|
||||
network: 'famedigital',
|
||||
parameters: { api: true },
|
||||
show: false, // no data sources
|
||||
active: false, // no data sources
|
||||
},
|
||||
{
|
||||
slug: 'peternorth',
|
||||
@@ -4157,6 +4157,7 @@ const sites = [
|
||||
{
|
||||
name: 'Teen BFF',
|
||||
slug: 'teenbff',
|
||||
alias: ['tbff'],
|
||||
url: 'https://pornpros.com/site/teenbff',
|
||||
tags: ['mff'],
|
||||
network: 'pornpros',
|
||||
@@ -4921,7 +4922,7 @@ const sites = [
|
||||
slug: 'bigboobbundle',
|
||||
url: 'https://www.bigboobbundle.com',
|
||||
network: 'score',
|
||||
show: false, // all content appears to be on subsites
|
||||
active: false, // all content appears to be on subsites
|
||||
},
|
||||
{
|
||||
name: 'Big Boobs POV',
|
||||
@@ -5213,7 +5214,7 @@ const sites = [
|
||||
slug: 'milfbundle',
|
||||
url: 'https://www.milfbundle.com',
|
||||
network: 'score',
|
||||
show: false,
|
||||
active: false,
|
||||
},
|
||||
{
|
||||
name: 'Teaming Cock',
|
||||
@@ -5280,7 +5281,7 @@ const sites = [
|
||||
slug: 'pornmegaload',
|
||||
url: 'https://www.pornmegaload.com',
|
||||
network: 'score',
|
||||
show: false,
|
||||
active: false,
|
||||
},
|
||||
{
|
||||
name: 'SaRennas World',
|
||||
@@ -5318,7 +5319,7 @@ const sites = [
|
||||
url: 'https://www.scorepass.com/scorelandtv',
|
||||
network: 'score',
|
||||
priority: 1,
|
||||
show: false, // appears to be streaming service for other sites
|
||||
active: false, // appears to be streaming service for other sites
|
||||
},
|
||||
{
|
||||
name: 'ScoreTV',
|
||||
@@ -5326,7 +5327,7 @@ const sites = [
|
||||
url: 'https://www.scoretv.tv',
|
||||
network: 'score',
|
||||
priority: 1,
|
||||
show: false, // similar to or same as Scoreland TV
|
||||
active: false, // similar to or same as Scoreland TV
|
||||
},
|
||||
{
|
||||
name: 'Score Videos',
|
||||
@@ -6177,7 +6178,7 @@ const sites = [
|
||||
/* eslint-disable max-len */
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const networks = await knex('networks').select('*');
|
||||
const networks = await knex('entities').select('*');
|
||||
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
|
||||
const tags = await knex('tags').select('*').where('alias_for', null);
|
||||
@@ -6190,24 +6191,24 @@ exports.seed = knex => Promise.resolve()
|
||||
description: site.description,
|
||||
url: site.url,
|
||||
parameters: site.parameters,
|
||||
network_id: networksMap[site.network],
|
||||
parent_id: networksMap[site.network],
|
||||
priority: site.priority,
|
||||
show: site.show,
|
||||
active: site.show,
|
||||
}));
|
||||
|
||||
const { inserted, updated } = await upsert('sites', sitesWithNetworks, 'slug', knex);
|
||||
const { inserted, updated } = await upsert('entities', sitesWithNetworks, 'slug', knex);
|
||||
const sitesMap = [].concat(inserted, updated).reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
|
||||
const tagAssociations = sites.map(site => (site.tags
|
||||
? site.tags.map(tagSlug => ({
|
||||
site_id: sitesMap[site.slug],
|
||||
entity_id: sitesMap[site.slug],
|
||||
tag_id: tagsMap[tagSlug],
|
||||
inherit: true,
|
||||
}))
|
||||
: []
|
||||
)).flat();
|
||||
|
||||
return upsert('sites_tags', tagAssociations, ['site_id', 'tag_id'], knex);
|
||||
return upsert('entities_tags', tagAssociations, ['entity_id', 'tag_id'], knex);
|
||||
});
|
||||
|
||||
/*
|
||||
|
||||
@@ -1,162 +1,170 @@
|
||||
const upsert = require('../src/utils/upsert');
|
||||
|
||||
function getStudios(networksMap) {
|
||||
return [
|
||||
// LegalPorno
|
||||
{
|
||||
slug: 'gonzocom',
|
||||
name: 'Gonzo.com',
|
||||
url: 'https://www.legalporno.com/studios/gonzo_com',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'giorgiograndi',
|
||||
name: 'Giorgio Grandi',
|
||||
url: 'https://www.legalporno.com/studios/giorgio-grandi',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'hardpornworld',
|
||||
name: 'Hard Porn World',
|
||||
url: 'https://www.legalporno.com/studios/hard-porn-world',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'interracialvision',
|
||||
name: 'Interracial Vision',
|
||||
url: 'https://www.legalporno.com/studios/interracial-vision',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'giorgioslab',
|
||||
name: 'Giorgio\'s Lab',
|
||||
url: 'https://www.legalporno.com/studios/giorgio--s-lab',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'americananal',
|
||||
name: 'American Anal',
|
||||
url: 'https://www.legalporno.com/studios/american-anal',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'assablanca',
|
||||
name: 'Assablanca',
|
||||
url: 'https://www.legalporno.com/studios/assablanca',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'focus',
|
||||
name: 'Focus',
|
||||
url: 'https://www.legalporno.com/studios/focus',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'analforever',
|
||||
name: 'Anal Forever',
|
||||
url: 'https://www.legalporno.com/studios/anal-forever',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'gonzoinbrazil',
|
||||
name: 'Gonzo in Brazil',
|
||||
url: 'https://www.legalporno.com/studios/gonzo-in-brazil',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'mranal',
|
||||
name: 'Mr Anal',
|
||||
url: 'https://www.legalporno.com/studios/mr-anal',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'tarrawhite',
|
||||
name: 'Tarra White',
|
||||
url: 'https://www.legalporno.com/studios/tarra-white',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexsos',
|
||||
name: 'Sineplex SOS',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-sos',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'fmodels',
|
||||
name: 'F Models',
|
||||
url: 'https://www.legalporno.com/studios/f-models',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexcz',
|
||||
name: 'Sineplex CZ',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-cz',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'gg',
|
||||
name: 'GG',
|
||||
url: 'https://www.legalporno.com/studios/gg',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'firstgape',
|
||||
name: 'First Gape',
|
||||
url: 'https://www.legalporno.com/studios/first-gape',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'omargalantiproductions',
|
||||
name: 'Omar Galanti Productions',
|
||||
url: 'https://www.legalporno.com/studios/omar-galanti-productions',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'norestfortheass',
|
||||
name: 'No Rest For The Ass',
|
||||
url: 'https://www.legalporno.com/studios/no-rest-for-the-ass',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'hairygonzo',
|
||||
name: 'Hairy Gonzo',
|
||||
url: 'https://www.legalporno.com/studios/hairy-gonzo',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexclassic',
|
||||
name: 'Sineplex Classic',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-classic',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sinemale',
|
||||
name: 'Sinemale',
|
||||
url: 'https://www.legalporno.com/studios/sinemale',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'outsidethestudio',
|
||||
name: 'Outside The Studio',
|
||||
url: 'https://www.legalporno.com/studios/outside-the-studio',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'kinkysex',
|
||||
name: 'Kinky Sex',
|
||||
url: 'https://www.legalporno.com/studios/kinky-sex',
|
||||
network_id: networksMap.legalporno,
|
||||
},
|
||||
];
|
||||
return [
|
||||
// LegalPorno
|
||||
{
|
||||
slug: 'gonzocom',
|
||||
name: 'Gonzo.com',
|
||||
url: 'https://www.legalporno.com/studios/gonzo_com',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'giorgiograndi',
|
||||
name: 'Giorgio Grandi',
|
||||
url: 'https://www.legalporno.com/studios/giorgio-grandi',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'hardpornworld',
|
||||
name: 'Hard Porn World',
|
||||
url: 'https://www.legalporno.com/studios/hard-porn-world',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'interracialvision',
|
||||
name: 'Interracial Vision',
|
||||
url: 'https://www.legalporno.com/studios/interracial-vision',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'giorgioslab',
|
||||
name: 'Giorgio\'s Lab',
|
||||
url: 'https://www.legalporno.com/studios/giorgio--s-lab',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'americananal',
|
||||
name: 'American Anal',
|
||||
url: 'https://www.legalporno.com/studios/american-anal',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'assablanca',
|
||||
name: 'Assablanca',
|
||||
url: 'https://www.legalporno.com/studios/assablanca',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'focus',
|
||||
name: 'Focus',
|
||||
url: 'https://www.legalporno.com/studios/focus',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'analforever',
|
||||
name: 'Anal Forever',
|
||||
url: 'https://www.legalporno.com/studios/anal-forever',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'gonzoinbrazil',
|
||||
name: 'Gonzo in Brazil',
|
||||
url: 'https://www.legalporno.com/studios/gonzo-in-brazil',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'mranal',
|
||||
name: 'Mr Anal',
|
||||
url: 'https://www.legalporno.com/studios/mr-anal',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'tarrawhite',
|
||||
name: 'Tarra White',
|
||||
url: 'https://www.legalporno.com/studios/tarra-white',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexsos',
|
||||
name: 'Sineplex SOS',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-sos',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'fmodels',
|
||||
name: 'F Models',
|
||||
url: 'https://www.legalporno.com/studios/f-models',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexcz',
|
||||
name: 'Sineplex CZ',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-cz',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'gg',
|
||||
name: 'GG',
|
||||
url: 'https://www.legalporno.com/studios/gg',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'firstgape',
|
||||
name: 'First Gape',
|
||||
url: 'https://www.legalporno.com/studios/first-gape',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'omargalantiproductions',
|
||||
name: 'Omar Galanti Productions',
|
||||
url: 'https://www.legalporno.com/studios/omar-galanti-productions',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'norestfortheass',
|
||||
name: 'No Rest For The Ass',
|
||||
url: 'https://www.legalporno.com/studios/no-rest-for-the-ass',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'hairygonzo',
|
||||
name: 'Hairy Gonzo',
|
||||
url: 'https://www.legalporno.com/studios/hairy-gonzo',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sineplexclassic',
|
||||
name: 'Sineplex Classic',
|
||||
url: 'https://www.legalporno.com/studios/sineplex-classic',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'sinemale',
|
||||
name: 'Sinemale',
|
||||
url: 'https://www.legalporno.com/studios/sinemale',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'outsidethestudio',
|
||||
name: 'Outside The Studio',
|
||||
url: 'https://www.legalporno.com/studios/outside-the-studio',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
{
|
||||
slug: 'kinkysex',
|
||||
name: 'Kinky Sex',
|
||||
url: 'https://www.legalporno.com/studios/kinky-sex',
|
||||
parent_id: networksMap.legalporno,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
||||
/* eslint-disable max-len */
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const networks = await knex('networks').select('*');
|
||||
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
.then(async () => {
|
||||
const [networks, types] = await Promise.all([
|
||||
knex('entities').select('*'),
|
||||
knex('entities_types').select('*'),
|
||||
]);
|
||||
|
||||
const studios = getStudios(networksMap);
|
||||
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
const typesMap = types.reduce((acc, type) => ({ [type.type]: type.id }), {});
|
||||
|
||||
return upsert('studios', studios, 'slug', knex);
|
||||
});
|
||||
const studios = getStudios(networksMap).map(studio => ({
|
||||
...studio,
|
||||
type: typesMap.studio,
|
||||
}));
|
||||
|
||||
return upsert('entities', studios, 'slug', knex);
|
||||
});
|
||||
|
||||
@@ -591,7 +591,7 @@ const tagPosters = [
|
||||
['anal-creampie', 1, 'Aleska Diamond in "Aleska Wants More" for Asshole Fever'],
|
||||
['ass-eating', 0, 'Angelica Heart and Leanna Sweet in "ATM Bitches" for Asshole Fever'],
|
||||
['asian', 0, 'Alina Li in "Slut Puppies 8" for Jules Jordan'],
|
||||
['atm', 2, 'Jureka Del Mar in "Stretched Out" for Her Limit'],
|
||||
['atm', 6, 'Jane Wilde in "Teen Anal" for Evil Angel'],
|
||||
['atogm', 0, 'Alysa Gap and Logan in "Anal Buffet 4" for Evil Angel'],
|
||||
['bdsm', 0, 'Dani Daniels in "The Traning of Dani Daniels, Day 2" for The Training of O at Kink'],
|
||||
['behind-the-scenes', 0, 'Janice Griffith in "Day With A Pornstar: Janice" for Brazzers'],
|
||||
@@ -659,6 +659,7 @@ const tagPhotos = [
|
||||
['airtight', 2, 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel'],
|
||||
['airtight', 3, 'Anita Bellini in "Triple Dick Gangbang" for Hands On Hardcore (DDF Network)'],
|
||||
['anal-creampie', 0, 'Gina Valentina and Jane Wilde in "A Very Special Anniversary" for Tushy'],
|
||||
['atm', 2, 'Jureka Del Mar in "Stretched Out" for Her Limit'],
|
||||
['atm', 0, 'Roxy Lips in "Under Her Coat" for 21 Naturals'],
|
||||
['atm', 3, 'Natasha Teen in "Work That Ass!" for Her Limit'],
|
||||
['asian', 'poster', 'Vina Sky in "Slut Puppies 15" for Jules Jordan'],
|
||||
|
||||
Reference in New Issue
Block a user