Fixed seed files for stand-alone channel entities.

This commit is contained in:
2020-06-28 00:44:53 +02:00
parent 3462d7af2a
commit 7d31dd8d52
6 changed files with 243 additions and 207 deletions

View File

@@ -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);