2019-11-06 01:47:10 +00:00
|
|
|
const upsert = require('../src/utils/upsert');
|
|
|
|
|
2020-06-27 22:44:53 +00:00
|
|
|
const studios = [
|
|
|
|
// LegalPorno
|
|
|
|
{
|
|
|
|
slug: 'gonzocom',
|
|
|
|
name: 'Gonzo.com',
|
|
|
|
url: 'https://www.legalporno.com/studios/gonzo_com',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'giorgiograndi',
|
|
|
|
name: 'Giorgio Grandi',
|
|
|
|
url: 'https://www.legalporno.com/studios/giorgio-grandi',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'hardpornworld',
|
|
|
|
name: 'Hard Porn World',
|
|
|
|
url: 'https://www.legalporno.com/studios/hard-porn-world',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'interracialvision',
|
|
|
|
name: 'Interracial Vision',
|
|
|
|
url: 'https://www.legalporno.com/studios/interracial-vision',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'giorgioslab',
|
|
|
|
name: 'Giorgio\'s Lab',
|
|
|
|
url: 'https://www.legalporno.com/studios/giorgio--s-lab',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'americananal',
|
|
|
|
name: 'American Anal',
|
|
|
|
url: 'https://www.legalporno.com/studios/american-anal',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'assablanca',
|
|
|
|
name: 'Assablanca',
|
|
|
|
url: 'https://www.legalporno.com/studios/assablanca',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'focus',
|
|
|
|
name: 'Focus',
|
|
|
|
url: 'https://www.legalporno.com/studios/focus',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'analforever',
|
|
|
|
name: 'Anal Forever',
|
|
|
|
url: 'https://www.legalporno.com/studios/anal-forever',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'gonzoinbrazil',
|
|
|
|
name: 'Gonzo in Brazil',
|
|
|
|
url: 'https://www.legalporno.com/studios/gonzo-in-brazil',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'mranal',
|
|
|
|
name: 'Mr Anal',
|
|
|
|
url: 'https://www.legalporno.com/studios/mr-anal',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'tarrawhite',
|
|
|
|
name: 'Tarra White',
|
|
|
|
url: 'https://www.legalporno.com/studios/tarra-white',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'sineplexsos',
|
|
|
|
name: 'Sineplex SOS',
|
|
|
|
url: 'https://www.legalporno.com/studios/sineplex-sos',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'fmodels',
|
|
|
|
name: 'F Models',
|
|
|
|
url: 'https://www.legalporno.com/studios/f-models',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'sineplexcz',
|
|
|
|
name: 'Sineplex CZ',
|
|
|
|
url: 'https://www.legalporno.com/studios/sineplex-cz',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'gg',
|
|
|
|
name: 'GG',
|
|
|
|
url: 'https://www.legalporno.com/studios/gg',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'firstgape',
|
|
|
|
name: 'First Gape',
|
|
|
|
url: 'https://www.legalporno.com/studios/first-gape',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'omargalantiproductions',
|
|
|
|
name: 'Omar Galanti Productions',
|
|
|
|
url: 'https://www.legalporno.com/studios/omar-galanti-productions',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-09-11 00:29:14 +00:00
|
|
|
{
|
|
|
|
slug: 'marywet',
|
|
|
|
name: 'Marywet',
|
|
|
|
url: 'https://www.legalporno.com/studios/marywet',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-06-27 22:44:53 +00:00
|
|
|
{
|
|
|
|
slug: 'norestfortheass',
|
|
|
|
name: 'No Rest For The Ass',
|
|
|
|
url: 'https://www.legalporno.com/studios/no-rest-for-the-ass',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'hairygonzo',
|
|
|
|
name: 'Hairy Gonzo',
|
|
|
|
url: 'https://www.legalporno.com/studios/hairy-gonzo',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'sineplexclassic',
|
|
|
|
name: 'Sineplex Classic',
|
|
|
|
url: 'https://www.legalporno.com/studios/sineplex-classic',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'sinemale',
|
|
|
|
name: 'Sinemale',
|
|
|
|
url: 'https://www.legalporno.com/studios/sinemale',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'outsidethestudio',
|
|
|
|
name: 'Outside The Studio',
|
|
|
|
url: 'https://www.legalporno.com/studios/outside-the-studio',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'kinkysex',
|
|
|
|
name: 'Kinky Sex',
|
|
|
|
url: 'https://www.legalporno.com/studios/kinky-sex',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-08-20 17:52:02 +00:00
|
|
|
{
|
|
|
|
slug: 'sexyangelproductions',
|
|
|
|
name: 'Sexy Angel Productions',
|
|
|
|
url: 'https://www.legalporno.com/studios/sexy-angel-productions',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-07-02 02:04:28 +00:00
|
|
|
{
|
|
|
|
slug: 'nfstudio',
|
|
|
|
name: 'N&F Studio',
|
|
|
|
url: 'https://www.legalporno.com/studios/nf-studio',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-07-02 23:28:22 +00:00
|
|
|
{
|
|
|
|
slug: 'natashateenproductions',
|
|
|
|
name: 'Natasha Teen Productions',
|
|
|
|
url: 'https://www.legalporno.com/studios/natasha-teen-productions',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'mixedstudios',
|
|
|
|
name: 'Mixed Studios',
|
|
|
|
url: 'https://www.legalporno.com/studios/mixed-studios',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'claudiasclips',
|
|
|
|
name: 'Claudia\'s Clips',
|
|
|
|
url: 'https://www.legalporno.com/studios/claudia--s-clips',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'rebeccasclips',
|
|
|
|
name: 'Rebecca\'s Clips',
|
|
|
|
url: 'https://www.legalporno.com/studios/rebecca--s-clips',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'private',
|
|
|
|
name: 'Private',
|
|
|
|
url: 'https://www.legalporno.com/studios/private',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'privatecastings',
|
|
|
|
name: 'Private Castings',
|
|
|
|
url: 'https://www.legalporno.com/studios/private-castings',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
slug: 'privateblack',
|
|
|
|
name: 'Private Black',
|
|
|
|
url: 'https://www.legalporno.com/studios/private-black',
|
|
|
|
parent: 'legalporno',
|
|
|
|
},
|
2020-06-27 22:44:53 +00:00
|
|
|
];
|
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 () => {
|
2020-06-27 22:44:53 +00:00
|
|
|
const networks = await knex('entities')
|
|
|
|
.whereIn('slug', studios.map(studio => studio.parent));
|
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 }), {});
|
2019-11-06 01:47:10 +00:00
|
|
|
|
2020-06-27 22:44:53 +00:00
|
|
|
const studiosWithNetwork = studios.map(studio => ({
|
|
|
|
slug: studio.slug,
|
|
|
|
name: studio.name,
|
|
|
|
url: studio.url,
|
2020-06-27 00:57:30 +00:00
|
|
|
type: 'studio',
|
2020-06-27 22:44:53 +00:00
|
|
|
parent_id: networksMap[studio.parent],
|
|
|
|
has_logo: studio.hasLogo || false,
|
2020-06-03 23:03:02 +00:00
|
|
|
}));
|
|
|
|
|
2020-07-02 23:28:22 +00:00
|
|
|
return upsert('entities', studiosWithNetwork, ['slug', 'type'], knex);
|
2020-06-03 23:03:02 +00:00
|
|
|
});
|