Refactored various modules for entities. Updated and refactored Kink scraper.

This commit is contained in:
ThePendulum 2020-06-27 02:57:30 +02:00
parent 4959dfd14f
commit af56378ee2
107 changed files with 539 additions and 414 deletions

View File

@ -14,6 +14,7 @@
:to="{ name: 'actors', params: { gender: 'male', letter } }" :to="{ name: 'actors', params: { gender: 'male', letter } }"
:class="{ selected: gender === 'male' }" :class="{ selected: gender === 'male' }"
class="gender-link male" class="gender-link male"
replace
><Gender gender="male" /></router-link> ><Gender gender="male" /></router-link>
</li> </li>
<li class="gender"> <li class="gender">
@ -21,6 +22,7 @@
:to="{ name: 'actors', params: { gender: 'trans', letter } }" :to="{ name: 'actors', params: { gender: 'trans', letter } }"
:class="{ selected: gender === 'trans' }" :class="{ selected: gender === 'trans' }"
class="gender-link transsexual" class="gender-link transsexual"
replace
><Gender gender="transsexual" /></router-link> ><Gender gender="transsexual" /></router-link>
</li> </li>
<li class="gender"> <li class="gender">
@ -28,6 +30,7 @@
:to="{ name: 'actors', params: { gender: 'other', letter } }" :to="{ name: 'actors', params: { gender: 'other', letter } }"
:class="{ selected: gender === 'other' }" :class="{ selected: gender === 'other' }"
class="gender-link other" class="gender-link other"
replace
><Icon icon="question5" /></router-link> ><Icon icon="question5" /></router-link>
</li> </li>
</ul> </ul>
@ -42,6 +45,7 @@
:to="{ name: 'actors', params: { gender, letter: letterX } }" :to="{ name: 'actors', params: { gender, letter: letterX } }"
:class="{ selected: letterX === letter }" :class="{ selected: letterX === letter }"
class="letter-link" class="letter-link"
replace
>{{ letterX || 'All' }}</router-link> >{{ letterX || 'All' }}</router-link>
</li> </li>
</ul> </ul>

View File

@ -130,30 +130,22 @@ import FilterBar from '../header/filter-bar.vue';
import Releases from '../releases/releases.vue'; import Releases from '../releases/releases.vue';
import Sites from '../sites/sites.vue'; import Sites from '../sites/sites.vue';
import Network from '../tile/network.vue'; import Network from '../tile/network.vue';
import Entity from '../tile/entity.vue';
async function fetchNetwork() { async function fetchNetwork() {
const { network, totalCount } = await this.$store.dispatch('fetchNetworkBySlug', { const { entity, totalCount } = await this.$store.dispatch('fetchEntityBySlugAndType', {
networkSlug: this.$route.params.networkSlug, entitySlug: this.$route.params.networkSlug,
entityType: 'network',
limit: this.limit, limit: this.limit,
range: this.$route.params.range, range: this.$route.params.range,
pageNumber: Number(this.$route.params.pageNumber), pageNumber: Number(this.$route.params.pageNumber),
}); });
this.network = network; this.network = entity;
this.totalCount = totalCount; this.networks = this.network.children;
if (this.network.studios) {
this.studios = this.network.studios.map(studio => ({
...studio,
network: this.network,
}));
}
this.networks = this.network.networks;
this.sites = this.network.sites
.filter(site => !site.independent);
this.releases = this.network.releases; this.releases = this.network.releases;
this.totalCount = totalCount;
} }
async function route() { async function route() {
@ -171,6 +163,7 @@ export default {
Releases, Releases,
Sites, Sites,
Network, Network,
Entity,
}, },
data() { data() {
return { return {

View File

@ -2,13 +2,13 @@
<div class="networks"> <div class="networks">
<form <form
class="search" class="search"
@submit.prevent="searchSites" @submit.prevent="searchEntities"
> >
<input <input
v-model="query" v-model="query"
:placeholder="`Find ${siteCount} sites in ${networks.length} networks`" :placeholder="`Find ${siteCount} sites in ${networks.length} networks`"
class="query" class="query"
@input="searchSites" @input="searchEntities"
> >
<button <button
@ -19,12 +19,12 @@
<div <div
v-if="query.length" v-if="query.length"
class="network-tiles" class="entity-tiles"
> >
<Site <Entity
v-for="site in searchResults" v-for="entity in searchResults"
:key="`site-tile-${site.slug}`" :key="`${entity.type}-tile-${entity.slug}`"
:site="site" :entity="entity"
/> />
<span v-if="searchResults.length === 0">No results for "{{ query }}"</span> <span v-if="searchResults.length === 0">No results for "{{ query }}"</span>
@ -32,41 +32,39 @@
<div <div
v-if="query.length === 0" v-if="query.length === 0"
class="network-tiles" class="entity-tiles"
> >
<Network <Entity
v-for="network in networks" v-for="network in networks"
:key="`network-tile-${network.slug}`" :key="`network-tile-${network.slug}`"
:network="network" :entity="network"
/> />
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Network from '../tile/network.vue'; import Entity from '../tile/entity.vue';
import Site from '../tile/site.vue';
async function searchSites() { async function searchEntities() {
this.searchResults = await this.$store.dispatch('searchSites', { this.searchResults = await this.$store.dispatch('searchEntities', {
query: this.query, query: this.query,
limit: 20, limit: 50,
}); });
} }
async function mounted() { async function mounted() {
this.networks = await this.$store.dispatch('fetchNetworks'); this.networks = await this.$store.dispatch('fetchEntities', { type: 'network' });
this.pageTitle = 'Networks'; this.pageTitle = 'Networks';
} }
function siteCount() { function siteCount() {
return this.networks.map(network => network.sites).flat().length; return this.networks.map(network => network.children).flat().length;
} }
export default { export default {
components: { components: {
Network, Entity,
Site,
}, },
data() { data() {
return { return {
@ -81,7 +79,7 @@ export default {
}, },
mounted, mounted,
methods: { methods: {
searchSites, searchEntities,
}, },
}; };
</script> </script>
@ -135,7 +133,7 @@ export default {
} }
} }
.network-tiles { .entity-tiles {
display: grid; display: grid;
grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
grid-gap: 1rem; grid-gap: 1rem;

View File

@ -211,25 +211,15 @@
target="_blank" target="_blank"
rel="noopener noreferrer" rel="noopener noreferrer"
class="link added" class="link added"
>{{ formatDate(release.dateAdded, 'MMMM D, YYYY') }}</a> >{{ formatDate(release.createdAt, 'MMMM D, YYYY HH:mm') }}</a>
</span> </span>
<div class="row">
<Icon icon="paste2" />
<input
class="filename"
:value="filename"
@focus="copyFilename"
>
</div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import config from 'config'; // import config from 'config';
import format from 'template-format'; // import format from 'template-format';
import Banner from './banner.vue'; import Banner from './banner.vue';
import Actor from '../tile/actor.vue'; import Actor from '../tile/actor.vue';
@ -240,13 +230,9 @@ function pageTitle() {
return this.release && this.release.title; return this.release && this.release.title;
} }
function copyFilename(event) {
event.target.setSelectionRange(0, event.target.value.length);
document.execCommand('copy');
}
async function mounted() { async function mounted() {
this.release = await this.$store.dispatch('fetchReleaseById', this.$route.params.releaseId); this.release = await this.$store.dispatch('fetchReleaseById', this.$route.params.releaseId);
/*
this.filename = format(config.filename.pattern, { this.filename = format(config.filename.pattern, {
...this.release, ...this.release,
shootId: this.release.shootId || '', shootId: this.release.shootId || '',
@ -254,6 +240,7 @@ async function mounted() {
}, { }, {
spreadSeparator: config.filename.separator, spreadSeparator: config.filename.separator,
}); });
*/
} }
export default { export default {
@ -273,9 +260,6 @@ export default {
pageTitle, pageTitle,
}, },
mounted, mounted,
methods: {
copyFilename,
},
}; };
</script> </script>

View File

@ -0,0 +1,74 @@
<template>
<a
:href="`/${entity.type}/${entity.slug}`"
:title="entity.name"
class="tile"
>
<img
v-if="entity.type === 'channel'"
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
:alt="entity.name"
class="logo"
>
<img
v-else
:src="`/img/logos/${entity.slug}/thumbs/network.png`"
:alt="entity.name"
class="logo"
>
</a>
</template>
<script>
export default {
props: {
entity: {
type: Object,
default: null,
},
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
height: 6rem;
background: $tile;
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: .5rem 1rem;
border-radius: .25rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
max-width: 100%;
max-height: 100%;
color: $text-contrast;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: bold;
filter: $logo-highlight;
}
.title {
color: $text;
height: 100%;
display: flex;
align-items: center;
margin: 0;
}
</style>

View File

@ -1,33 +1,33 @@
<template> <template>
<a <a
:href="`/network/${network.slug}`" :href="`/network/${network.slug}`"
:title="network.name" :title="network.name"
class="tile" class="tile"
:class="{ sfw }" :class="{ sfw }"
> >
<img <img
:src="`/img/logos/${network.slug}/thumbs/network.png`" :src="`/img/logos/${network.slug}/thumbs/network.png`"
:alt="network.name" :alt="network.name"
class="logo" class="logo lazy"
> >
</a> </a>
</template> </template>
<script> <script>
function sfw() { function sfw() {
return this.$store.state.ui.sfw; return this.$store.state.ui.sfw;
} }
export default { export default {
props: { props: {
network: { network: {
type: Object, type: Object,
default: null, default: null,
}, },
}, },
computed: { computed: {
sfw, sfw,
}, },
}; };
</script> </script>
@ -39,7 +39,7 @@ export default {
background: var(--profile); background: var(--profile);
display: flex; display: flex;
flex-shrink: 0; flex-shrink: 0;
flex-direction: column; justify-content: center;
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
padding: .5rem 1rem; padding: .5rem 1rem;
@ -52,16 +52,9 @@ export default {
} }
.logo { .logo {
width: 100%; max-width: 100%;
height: 100%; max-height: 100%;
color: $text;
display: flex;
align-items: center;
justify-content: center;
object-fit: contain;
font-size: 1rem; font-size: 1rem;
font-weight: bold;
/* filter: $logo-highlight; */
} }
.title { .title {

View File

@ -100,6 +100,7 @@ function curateSite(site, network) {
function curateNetwork(network, releases) { function curateNetwork(network, releases) {
const curatedNetwork = { const curatedNetwork = {
...network,
id: network.id, id: network.id,
name: network.name, name: network.name,
slug: network.slug, slug: network.slug,
@ -116,6 +117,19 @@ function curateNetwork(network, releases) {
return curatedNetwork; return curatedNetwork;
} }
function curateEntity(entity, parent, releases) {
const curatedEntity = {
...entity,
children: [],
};
if (entity.parent || parent) curatedEntity.parent = curateEntity(entity.parent || parent);
if (entity.children) curatedEntity.children = entity.children.map(childEntity => curateEntity(childEntity, curatedEntity));
if (releases) curatedEntity.releases = releases.map(release => curateRelease(release));
return curatedEntity;
}
function curateTag(tag) { function curateTag(tag) {
const curatedTag = { const curatedTag = {
...tag, ...tag,
@ -130,6 +144,7 @@ function curateTag(tag) {
export { export {
curateActor, curateActor,
curateEntity,
curateRelease, curateRelease,
curateSite, curateSite,
curateNetwork, curateNetwork,

View File

@ -0,0 +1,179 @@
import { graphql } from '../api';
// import { sitesFragment, releaseFields } from '../fragments';
import { releaseFields } from '../fragments';
import { curateEntity } from '../curate';
import getDateRange from '../get-date-range';
function initEntitiesActions(store, _router) {
async function fetchEntityBySlugAndType({ _commit }, {
entitySlug,
entityType,
limit = 10,
pageNumber = 1,
range = 'latest',
}) {
const { before, after, orderBy } = getDateRange(range);
const { entity, connection: { releases, totalCount } } = await graphql(`
query Entity(
$entitySlug: String!
$entityType: String! = "channel"
$limit: Int = 10,
$offset: Int = 0,
$after: Date = "1900-01-01",
$before: Date = "2100-01-01",
$afterTime: Datetime = "1900-01-01",
$beforeTime: Datetime = "2100-01-01",
$orderBy: [ReleasesOrderBy!]
$exclude: [String!]
) {
entity: entityBySlugAndType(slug: $entitySlug, type: $entityType) {
id
name
slug
url
children: childEntities(
orderBy: [PRIORITY_DESC, NAME_ASC],
) {
id
name
slug
url
type
priority
}
parent {
id
name
slug
type
url
}
}
connection: releasesConnection(
first: $limit
offset: $offset
orderBy: $orderBy
filter: {
entity: {
or: [
{ parent: { slug: { equalTo: $entitySlug } } },
{ parent: { parent: { slug: { equalTo: $entitySlug } } } }
]
}
or: [
{
date: {
lessThan: $before,
greaterThan: $after
}
},
{
date: {
isNull: true
},
createdAt: {
lessThan: $beforeTime,
greaterThan: $afterTime,
}
}
]
releasesTagsConnection: {
none: {
tag: {
slug: {
in: $exclude
}
}
}
}
}
) {
releases: nodes {
${releaseFields}
}
totalCount
}
}
`, {
entitySlug,
entityType,
limit,
offset: Math.max(0, (pageNumber - 1)) * limit,
after,
before,
orderBy,
afterTime: store.getters.after,
beforeTime: store.getters.before,
exclude: store.state.ui.filter,
});
return {
entity: curateEntity(entity, null, releases),
totalCount,
};
}
async function fetchEntities({ _commit }, { type }) {
const { entities } = await graphql(`
query Entities(
$type: String! = "network"
) {
entities(
orderBy: NAME_ASC
filter: {
type: {
equalTo: $type
}
}
) {
id
name
slug
type
url
}
}
`, { type });
return entities.map(entity => curateEntity(entity));
}
async function searchEntities({ _commit }, { query, limit = 20 }) {
const { entities } = await graphql(`
query SearchEntities(
$query: String!
$limit:Int = 20,
) {
entities: searchEntities(
search: $query,
first: $limit
) {
name
slug
type
url
parent {
name
slug
type
url
}
}
}
`, {
query,
limit,
});
return entities.map(entity => curateEntity(entity));
}
return {
fetchEntityBySlugAndType,
fetchEntities,
searchEntities,
};
}
export default initEntitiesActions;

View File

@ -0,0 +1,13 @@
import state from './state';
import mutations from './mutations';
import actions from './actions';
function initEntitiesStore(store, router) {
return {
state,
mutations,
actions: actions(store, router),
};
}
export default initEntitiesStore;

View File

@ -0,0 +1 @@
export default {};

View File

@ -0,0 +1 @@
export default {};

View File

@ -25,7 +25,7 @@ function initNetworksActions(store, _router) {
$orderBy: [ReleasesOrderBy!] $orderBy: [ReleasesOrderBy!]
$exclude: [String!] $exclude: [String!]
) { ) {
network: entityBySlugAndType(slug: $networkSlug, type: 1) { network: entityBySlugAndType(slug: $networkSlug, type: "network") {
id id
name name
slug slug
@ -37,12 +37,14 @@ function initNetworksActions(store, _router) {
name name
slug slug
url url
type
priority priority
} }
parent { parent {
id id
name name
slug slug
type
url url
} }
} }
@ -51,10 +53,10 @@ function initNetworksActions(store, _router) {
offset: $offset offset: $offset
orderBy: $orderBy orderBy: $orderBy
filter: { filter: {
site: { entity: {
or: [ or: [
{ network: { slug: { equalTo: $networkSlug } } }, { parent: { slug: { equalTo: $networkSlug } } },
{ network: { parent: { slug: { equalTo: $networkSlug } } } } { parent: { parent: { slug: { equalTo: $networkSlug } } } }
] ]
} }
or: [ or: [
@ -116,13 +118,14 @@ function initNetworksActions(store, _router) {
orderBy: NAME_ASC orderBy: NAME_ASC
filter: { filter: {
type: { type: {
equalTo: 1 equalTo: "network"
} }
} }
) { ) {
id id
name name
slug slug
type
url url
} }
} }

View File

@ -22,18 +22,18 @@ function initSitesActions(store, _router) {
$orderBy:[ReleasesOrderBy!] $orderBy:[ReleasesOrderBy!]
$exclude: [String!] $exclude: [String!]
) { ) {
site: siteBySlug(slug: $siteSlug) { site: entityBySlugAndType(slug: $siteSlug, type: 2) {
name name
slug slug
url url
tags: sitesTags { tags: entitiesTags {
tag { tag {
id id
slug slug
name name
} }
} }
network { network: parent {
id id
name name
slug slug
@ -70,7 +70,7 @@ function initSitesActions(store, _router) {
offset: $offset offset: $offset
orderBy: $orderBy orderBy: $orderBy
filter: { filter: {
site: { entity: {
slug: { slug: {
equalTo: $siteSlug equalTo: $siteSlug
} }
@ -122,7 +122,7 @@ function initSitesActions(store, _router) {
$after:Date = "1900-01-01", $after:Date = "1900-01-01",
$before:Date = "2100-01-01", $before:Date = "2100-01-01",
) { ) {
site { site: entity {
name name
slug slug
url url
@ -137,38 +137,9 @@ function initSitesActions(store, _router) {
return sites; return sites;
} }
async function searchSites({ _commit }, { query, limit = 20 }) {
const { sites } = await graphql(`
query SearchSites(
$query: String!
$limit:Int = 20,
) {
sites: searchSites(
search: $query,
first: $limit
) {
name
slug
url
network {
name
slug
url
}
}
}
`, {
query,
limit,
});
return sites;
}
return { return {
fetchSiteBySlug, fetchSiteBySlug,
fetchSites, fetchSites,
searchSites,
}; };
} }

View File

@ -4,6 +4,7 @@ import Vuex from 'vuex';
import initUiStore from './ui/ui'; import initUiStore from './ui/ui';
import initAuthStore from './auth/auth'; import initAuthStore from './auth/auth';
import initReleasesStore from './releases/releases'; import initReleasesStore from './releases/releases';
import initEntitiesStore from './entities/entities';
import initSitesStore from './sites/sites'; import initSitesStore from './sites/sites';
import initNetworksStore from './networks/networks'; import initNetworksStore from './networks/networks';
import initActorsStore from './actors/actors'; import initActorsStore from './actors/actors';
@ -18,6 +19,7 @@ function initStore(router) {
store.registerModule('auth', initAuthStore(store, router)); store.registerModule('auth', initAuthStore(store, router));
store.registerModule('releases', initReleasesStore(store, router)); store.registerModule('releases', initReleasesStore(store, router));
store.registerModule('actors', initActorsStore(store, router)); store.registerModule('actors', initActorsStore(store, router));
store.registerModule('entities', initEntitiesStore(store, router));
store.registerModule('sites', initSitesStore(store, router)); store.registerModule('sites', initSitesStore(store, router));
store.registerModule('networks', initNetworksStore(store, router)); store.registerModule('networks', initNetworksStore(store, router));
store.registerModule('tags', initTagsStore(store, router)); store.registerModule('tags', initTagsStore(store, router));

View File

@ -141,8 +141,8 @@ exports.up = knex => Promise.resolve()
table.unique(['tag_id', 'media_id']); table.unique(['tag_id', 'media_id']);
})) }))
.then(() => knex.schema.createTable('entities_types', (table) => { .then(() => knex.schema.createTable('entities_types', (table) => {
table.increments('id', 4); table.text('type')
table.text('type'); .primary();
})) }))
.then(() => knex('entities_types').insert([ .then(() => knex('entities_types').insert([
{ type: 'network' }, { type: 'network' },
@ -160,10 +160,11 @@ exports.up = knex => Promise.resolve()
table.text('name'); table.text('name');
table.text('slug', 32); table.text('slug', 32);
table.integer('type', 4) table.text('type')
.references('id') .notNullable()
.references('type')
.inTable('entities_types') .inTable('entities_types')
.defaultTo(2); .defaultTo('channel');
table.unique(['slug', 'type']); table.unique(['slug', 'type']);
@ -196,114 +197,18 @@ exports.up = knex => Promise.resolve()
table.unique(['tag_id', 'entity_id']); table.unique(['tag_id', 'entity_id']);
})) }))
.then(() => knex.schema.createTable('networks', (table) => { .then(() => knex.schema.createTable('entities_social', (table) => {
table.increments('id', 12);
table.text('name');
table.text('alias');
table.text('url');
table.text('description');
table.json('parameters');
table.integer('parent_id', 12)
.references('id')
.inTable('networks');
table.text('slug', 32)
.unique();
table.datetime('created_at')
.defaultTo(knex.fn.now());
}))
.then(() => knex.schema.createTable('networks_social', (table) => {
table.increments('id', 16); table.increments('id', 16);
table.text('url'); table.text('url');
table.text('platform'); table.text('platform');
table.integer('network_id', 12) table.integer('entity_id', 12)
.notNullable() .notNullable()
.references('id') .references('id')
.inTable('networks'); .inTable('entities');
table.unique(['url', 'network_id']); table.unique(['url', 'entity_id']);
table.datetime('created_at')
.defaultTo(knex.fn.now());
}))
.then(() => knex.schema.createTable('sites', (table) => {
table.increments('id', 12);
table.integer('network_id', 12)
.notNullable()
.references('id')
.inTable('networks');
table.text('name');
table.text('slug', 32)
.unique();
table.text('alias');
table.text('url');
table.text('description');
table.json('parameters');
table.integer('priority', 3)
.defaultTo(0);
table.boolean('show')
.defaultTo(true);
table.datetime('created_at')
.defaultTo(knex.fn.now());
}))
.then(() => knex.schema.createTable('sites_tags', (table) => {
table.integer('tag_id', 12)
.notNullable()
.references('id')
.inTable('tags');
table.integer('site_id', 12)
.notNullable()
.references('id')
.inTable('sites');
table.boolean('inherit')
.defaultTo(false);
table.unique(['tag_id', 'site_id']);
}))
.then(() => knex.schema.createTable('sites_social', (table) => {
table.increments('id', 16);
table.text('url');
table.text('platform');
table.integer('site_id', 12)
.notNullable()
.references('id')
.inTable('sites');
table.unique(['url', 'site_id']);
table.datetime('created_at')
.defaultTo(knex.fn.now());
}))
.then(() => knex.schema.createTable('studios', (table) => {
table.increments('id', 12);
table.integer('network_id', 12)
.notNullable()
.references('id')
.inTable('networks');
table.text('name');
table.text('url');
table.text('description');
table.text('slug', 32)
.unique();
table.datetime('created_at') table.datetime('created_at')
.defaultTo(knex.fn.now()); .defaultTo(knex.fn.now());
@ -683,7 +588,7 @@ exports.up = knex => Promise.resolve()
table.integer('studio_id', 12) table.integer('studio_id', 12)
.references('id') .references('id')
.inTable('studios'); .inTable('entities');
table.text('type', 10) table.text('type', 10)
.defaultTo('scene'); .defaultTo('scene');
@ -878,8 +783,8 @@ exports.up = knex => Promise.resolve()
); );
$$ LANGUAGE SQL STABLE; $$ LANGUAGE SQL STABLE;
CREATE FUNCTION search_sites(search text) RETURNS SETOF sites AS $$ CREATE FUNCTION search_entities(search text) RETURNS SETOF entities AS $$
SELECT * FROM sites SELECT * FROM entities
WHERE WHERE
name ILIKE ('%' || search || '%') OR name ILIKE ('%' || search || '%') OR
slug ILIKE ('%' || search || '%') OR slug ILIKE ('%' || search || '%') OR
@ -944,6 +849,7 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
DROP TABLE IF EXISTS body CASCADE; DROP TABLE IF EXISTS body CASCADE;
DROP TABLE IF EXISTS entities_tags CASCADE; DROP TABLE IF EXISTS entities_tags CASCADE;
DROP TABLE IF EXISTS entities_social CASCADE;
DROP TABLE IF EXISTS sites_tags CASCADE; DROP TABLE IF EXISTS sites_tags CASCADE;
DROP TABLE IF EXISTS sites_social CASCADE; DROP TABLE IF EXISTS sites_social CASCADE;
DROP TABLE IF EXISTS networks_social CASCADE; DROP TABLE IF EXISTS networks_social CASCADE;
@ -966,6 +872,7 @@ exports.down = (knex) => { // eslint-disable-line arrow-body-style
DROP TABLE IF EXISTS entities CASCADE; DROP TABLE IF EXISTS entities CASCADE;
DROP FUNCTION IF EXISTS search_sites; DROP FUNCTION IF EXISTS search_sites;
DROP FUNCTION IF EXISTS search_entities;
DROP FUNCTION IF EXISTS search_actors; DROP FUNCTION IF EXISTS search_actors;
DROP FUNCTION IF EXISTS get_random_sfw_media_id; DROP FUNCTION IF EXISTS get_random_sfw_media_id;

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

After

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.3 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

After

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.3 KiB

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.8 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.1 KiB

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 50 KiB

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.0 KiB

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -21,6 +21,10 @@ const parentNetworks = [
slug: 'whalemember', slug: 'whalemember',
name: 'Whale Member', name: 'Whale Member',
}, },
{
slug: 'wgcz',
name: 'WGCZ Holding',
},
]; ];
const networks = [ const networks = [
@ -98,6 +102,7 @@ const networks = [
name: 'Bang Bros', name: 'Bang Bros',
url: 'https://bangbros.com', url: 'https://bangbros.com',
description: 'Here at Bang Bros, we only film the best highest quality porn with the sexiest Amateur girls and the top pornstars. Updated daily on Bangbros.com.', description: 'Here at Bang Bros, we only film the best highest quality porn with the sexiest Amateur girls and the top pornstars. Updated daily on Bangbros.com.',
parent: 'wgcz',
}, },
{ {
slug: 'blowpass', slug: 'blowpass',
@ -120,7 +125,7 @@ const networks = [
slug: 'boobpedia', slug: 'boobpedia',
name: 'Boobpedia', name: 'Boobpedia',
url: 'https://www.boobpedia.com', url: 'https://www.boobpedia.com',
type: 4, type: 'info',
}, },
{ {
slug: 'burningangel', slug: 'burningangel',
@ -142,13 +147,14 @@ const networks = [
slug: 'freeones', slug: 'freeones',
name: 'FreeOnes', name: 'FreeOnes',
url: 'https://www.freeones.com', url: 'https://www.freeones.com',
type: 4, type: 'info',
}, },
{ {
slug: 'ddfnetwork', slug: 'ddfnetwork',
name: 'DDF Network', name: 'DDF Network',
url: 'https://ddfnetwork.com', url: 'https://ddfnetwork.com',
description: 'European porn videos hub with exclusive VR, 4K and full HD XXX videos and hot sex photos of Europes finest porn star babes.', description: 'European porn videos hub with exclusive VR, 4K and full HD XXX videos and hot sex photos of Europes finest porn star babes.',
parent: 'wgcz',
}, },
{ {
slug: 'digitalplayground', slug: 'digitalplayground',
@ -272,6 +278,7 @@ const networks = [
name: 'LegalPorno', name: 'LegalPorno',
url: 'https://www.legalporno.com', url: 'https://www.legalporno.com',
description: 'The Best HD Porn For You!', description: 'The Best HD Porn For You!',
parent: 'wgcz',
}, },
{ {
slug: 'men', slug: 'men',
@ -355,6 +362,7 @@ const networks = [
name: 'Private', name: 'Private',
url: 'https://www.private.com', url: 'https://www.private.com',
description: 'Private is the best source for adult movies and videos. Featuring the most popular hardcore adult stars in hundreds of porn movies, Private.com delivers...', description: 'Private is the best source for adult movies and videos. Featuring the most popular hardcore adult stars in hundreds of porn movies, Private.com delivers...',
parent: 'wgcz',
}, },
{ {
slug: 'puretaboo', slug: 'puretaboo',
@ -437,13 +445,13 @@ const networks = [
exports.seed = knex => Promise.resolve() exports.seed = knex => Promise.resolve()
.then(async () => { .then(async () => {
const { inserted, updated } = await upsert('entities', parentNetworks.map(network => ({ ...network, type: 1 })), ['slug', 'type'], knex); const { inserted, updated } = await upsert('entities', parentNetworks.map(network => ({ ...network, type: 'network' })), ['slug', 'type'], knex);
const parentNetworksBySlug = [].concat(inserted, updated).reduce((acc, network) => ({ ...acc, [network.slug]: network.id }), {}); const parentNetworksBySlug = [].concat(inserted, updated).reduce((acc, network) => ({ ...acc, [network.slug]: network.id }), {});
const networksWithParent = networks.map(network => ({ const networksWithParent = networks.map(network => ({
slug: network.slug, slug: network.slug,
name: network.name, name: network.name,
type: network.type || 1, type: network.type || 'network',
alias: network.alias ? network.alias.join(',') : null, alias: network.alias ? network.alias.join(',') : null,
url: network.url, url: network.url,
description: network.description, description: network.description,

Some files were not shown because too many files have changed in this diff Show More