Fixed seed files for stand-alone channel entities.
This commit is contained in:
@@ -1157,7 +1157,6 @@ const sites = [
|
||||
url: 'https://www.sunlustxxx.com',
|
||||
description: '',
|
||||
parent: 'blowpass',
|
||||
active: true, // site offline, use only for indexing old scenes
|
||||
},
|
||||
// BOOBPEDIA
|
||||
{
|
||||
@@ -1555,6 +1554,7 @@ const sites = [
|
||||
url: 'https://www.digitalplayground.com/scenes?site=206',
|
||||
description: '',
|
||||
parent: 'digitalplayground',
|
||||
hasLogo: false,
|
||||
},
|
||||
{
|
||||
slug: 'flixxx',
|
||||
@@ -1583,6 +1583,7 @@ const sites = [
|
||||
url: 'https://www.digitalplayground.com/scenes?site=211',
|
||||
description: '',
|
||||
parent: 'digitalplayground',
|
||||
hasLogo: false,
|
||||
},
|
||||
{
|
||||
slug: 'dpparodies',
|
||||
@@ -1875,7 +1876,6 @@ 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.',
|
||||
parent: 'famedigital',
|
||||
parameters: { api: true },
|
||||
active: false, // no data sources
|
||||
},
|
||||
{
|
||||
slug: 'peternorth',
|
||||
@@ -4928,7 +4928,6 @@ const sites = [
|
||||
slug: 'bigboobbundle',
|
||||
url: 'https://www.bigboobbundle.com',
|
||||
parent: 'score',
|
||||
active: false, // all content appears to be on subsites
|
||||
},
|
||||
{
|
||||
name: 'Big Boobs POV',
|
||||
@@ -5220,7 +5219,6 @@ const sites = [
|
||||
slug: 'milfbundle',
|
||||
url: 'https://www.milfbundle.com',
|
||||
parent: 'score',
|
||||
active: false,
|
||||
},
|
||||
{
|
||||
name: 'Teaming Cock',
|
||||
@@ -5287,7 +5285,6 @@ const sites = [
|
||||
slug: 'pornmegaload',
|
||||
url: 'https://www.pornmegaload.com',
|
||||
parent: 'score',
|
||||
active: false,
|
||||
},
|
||||
{
|
||||
name: 'SaRennas World',
|
||||
@@ -5325,7 +5322,6 @@ const sites = [
|
||||
url: 'https://www.scorepass.com/scorelandtv',
|
||||
parent: 'score',
|
||||
priority: 1,
|
||||
active: false, // appears to be streaming service for other sites
|
||||
},
|
||||
{
|
||||
name: 'ScoreTV',
|
||||
@@ -5333,7 +5329,6 @@ const sites = [
|
||||
url: 'https://www.scoretv.tv',
|
||||
parent: 'score',
|
||||
priority: 1,
|
||||
active: false, // similar to or same as Scoreland TV
|
||||
},
|
||||
{
|
||||
name: 'Score Videos',
|
||||
@@ -6366,7 +6361,10 @@ const sites = [
|
||||
/* eslint-disable max-len */
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const networks = await knex('entities').where('type', 'network');
|
||||
const networks = await knex('entities')
|
||||
.where('type', 'network')
|
||||
.orWhereNull('parent_id');
|
||||
|
||||
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
|
||||
const tags = await knex('tags').select('*').where('alias_for', null);
|
||||
@@ -6382,7 +6380,7 @@ exports.seed = knex => Promise.resolve()
|
||||
parameters: site.parameters,
|
||||
parent_id: networksMap[site.parent],
|
||||
priority: site.priority,
|
||||
active: site.show,
|
||||
has_logo: site.hasLogo,
|
||||
}));
|
||||
|
||||
const { inserted, updated } = await upsert('entities', sitesWithNetworks, ['slug', 'type'], knex);
|
||||
|
||||
@@ -1,166 +1,169 @@
|
||||
const upsert = require('../src/utils/upsert');
|
||||
|
||||
function getStudios(networksMap) {
|
||||
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,
|
||||
},
|
||||
];
|
||||
}
|
||||
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',
|
||||
},
|
||||
{
|
||||
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',
|
||||
},
|
||||
];
|
||||
|
||||
/* eslint-disable max-len */
|
||||
exports.seed = knex => Promise.resolve()
|
||||
.then(async () => {
|
||||
const networks = await knex('entities').select('*').where('type', 'network');
|
||||
const networks = await knex('entities')
|
||||
.whereIn('slug', studios.map(studio => studio.parent));
|
||||
|
||||
const networksMap = networks.reduce((acc, { id, slug }) => ({ ...acc, [slug]: id }), {});
|
||||
|
||||
const studios = getStudios(networksMap).map(studio => ({
|
||||
...studio,
|
||||
const studiosWithNetwork = studios.map(studio => ({
|
||||
slug: studio.slug,
|
||||
name: studio.name,
|
||||
url: studio.url,
|
||||
type: 'studio',
|
||||
parent_id: networksMap[studio.parent],
|
||||
has_logo: studio.hasLogo || false,
|
||||
}));
|
||||
|
||||
return upsert('entities', studios, 'slug', knex);
|
||||
return upsert('entities', studiosWithNetwork, 'slug', knex);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user