2019-11-06 01:47:10 +00:00
|
|
|
const upsert = require('../src/utils/upsert');
|
|
|
|
|
|
|
|
function getStudios(networksMap) {
|
2020-06-03 23:03:02 +00:00
|
|
|
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,
|
|
|
|
},
|
|
|
|
];
|
2019-11-06 01:47:10 +00:00
|
|
|
}
|
|
|
|
|
2019-10-31 00:53:26 +00:00
|
|
|
/* eslint-disable max-len */
|
|
|
|
exports.seed = knex => Promise.resolve()
|
2020-06-03 23:03:02 +00:00
|
|
|
.then(async () => {
|
|
|
|
const [networks, types] = await Promise.all([
|
|
|
|
knex('entities').select('*'),
|
|
|
|
knex('entities_types').select('*'),
|
|
|
|
]);
|
2019-10-31 00:53:26 +00:00
|
|
|
|
2020-06-03 23:03:02 +00:00
|
|
|
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
|
|
|
const typesMap = types.reduce((acc, type) => ({ [type.type]: type.id }), {});
|
2019-11-06 01:47:10 +00:00
|
|
|
|
2020-06-03 23:03:02 +00:00
|
|
|
const studios = getStudios(networksMap).map(studio => ({
|
|
|
|
...studio,
|
|
|
|
type: typesMap.studio,
|
|
|
|
}));
|
|
|
|
|
|
|
|
return upsert('entities', studios, 'slug', knex);
|
|
|
|
});
|