Compare commits
No commits in common. "6edd587a334b33fb32e96b35cd1418221565cce3" and "744bdb317019bfb6fbd341eae522e90b399fa513" have entirely different histories.
6edd587a33
...
744bdb3170
|
@ -273,7 +273,6 @@ exports.up = (knex) => Promise.resolve()
|
||||||
table.integer('age', 3);
|
table.integer('age', 3);
|
||||||
|
|
||||||
table.text('gender', 18);
|
table.text('gender', 18);
|
||||||
table.text('orientation');
|
|
||||||
table.text('description');
|
table.text('description');
|
||||||
|
|
||||||
table.text('birth_city');
|
table.text('birth_city');
|
||||||
|
@ -347,7 +346,6 @@ exports.up = (knex) => Promise.resolve()
|
||||||
|
|
||||||
table.text('real_name');
|
table.text('real_name');
|
||||||
table.text('gender', 18);
|
table.text('gender', 18);
|
||||||
table.text('orientation');
|
|
||||||
|
|
||||||
table.date('date_of_birth');
|
table.date('date_of_birth');
|
||||||
table.date('date_of_death');
|
table.date('date_of_death');
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
exports.up = async (knex) => {
|
||||||
|
await knex.schema.alterTable('actors', (table) => {
|
||||||
|
table.text('orientation');
|
||||||
|
});
|
||||||
|
|
||||||
|
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||||
|
table.text('orientation');
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
|
exports.down = async (knex) => {
|
||||||
|
await knex.schema.alterTable('actors', (table) => {
|
||||||
|
table.dropColumn('orientation');
|
||||||
|
});
|
||||||
|
|
||||||
|
await knex.schema.alterTable('actors_profiles', (table) => {
|
||||||
|
table.dropColumn('orientation');
|
||||||
|
});
|
||||||
|
};
|
|
@ -1,12 +1,12 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.228.15",
|
"version": "1.228.14",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.228.15",
|
"version": "1.228.14",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@casl/ability": "^5.2.2",
|
"@casl/ability": "^5.2.2",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "traxxx",
|
"name": "traxxx",
|
||||||
"version": "1.228.15",
|
"version": "1.228.14",
|
||||||
"description": "All the latest porn releases in one place",
|
"description": "All the latest porn releases in one place",
|
||||||
"main": "src/app.js",
|
"main": "src/app.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|
|
@ -244,12 +244,6 @@ const { argv } = yargs
|
||||||
type: 'string',
|
type: 'string',
|
||||||
default: process.env.NODE_ENV === 'development' ? 'silly' : 'info',
|
default: process.env.NODE_ENV === 'development' ? 'silly' : 'info',
|
||||||
})
|
})
|
||||||
.option('prefer-entity', {
|
|
||||||
alias: 'prefer',
|
|
||||||
describe: 'Prefer network or channel when resolving entities with the same identifier.',
|
|
||||||
choices: ['channel', 'network'],
|
|
||||||
type: 'string',
|
|
||||||
})
|
|
||||||
.option('resolve-place', {
|
.option('resolve-place', {
|
||||||
describe: 'Call OSM Nominatim API for actor place of birth and residence. Raw value discarded if disabled.',
|
describe: 'Call OSM Nominatim API for actor place of birth and residence. Raw value discarded if disabled.',
|
||||||
type: 'boolean',
|
type: 'boolean',
|
||||||
|
|
|
@ -199,7 +199,7 @@ async function fetchIncludedEntities() {
|
||||||
return curatedNetworks;
|
return curatedNetworks;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchEntitiesBySlug(entitySlugs, prefer = 'channel') {
|
async function fetchEntitiesBySlug(entitySlugs, sort = 'asc') {
|
||||||
const entities = await knex.raw(`
|
const entities = await knex.raw(`
|
||||||
WITH RECURSIVE entity_tree as (
|
WITH RECURSIVE entity_tree as (
|
||||||
SELECT to_jsonb(entities) as entity,
|
SELECT to_jsonb(entities) as entity,
|
||||||
|
@ -235,7 +235,7 @@ async function fetchEntitiesBySlug(entitySlugs, prefer = 'channel') {
|
||||||
`, {
|
`, {
|
||||||
entitySlugs: entitySlugs.filter((slug) => !slug.includes('.')),
|
entitySlugs: entitySlugs.filter((slug) => !slug.includes('.')),
|
||||||
entityHosts: entitySlugs.filter((slug) => slug.includes('.')).map((hostname) => `%${hostname}%`),
|
entityHosts: entitySlugs.filter((slug) => slug.includes('.')).map((hostname) => `%${hostname}%`),
|
||||||
sort: knex.raw(prefer === 'channel' ? 'asc' : 'desc'),
|
sort: knex.raw(sort),
|
||||||
});
|
});
|
||||||
|
|
||||||
// channel entity will overwrite network entity
|
// channel entity will overwrite network entity
|
||||||
|
@ -262,7 +262,7 @@ async function fetchReleaseEntities(baseReleases) {
|
||||||
.filter(Boolean),
|
.filter(Boolean),
|
||||||
));
|
));
|
||||||
|
|
||||||
return fetchEntitiesBySlug(entitySlugs, argv.prefer || 'network');
|
return fetchEntitiesBySlug(entitySlugs, 'desc');
|
||||||
}
|
}
|
||||||
|
|
||||||
async function fetchEntity(entityId, type) {
|
async function fetchEntity(entityId, type) {
|
||||||
|
|
Loading…
Reference in New Issue