Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 5b623ee46f 1.205.0 2022-01-24 00:15:19 +01:00
DebaucheryLibrarian 7ceec1c739 Added indexes to scene tag and movie scene tables improve performance. Removed scene count from channel overview, too expensive. 2022-01-24 00:15:11 +01:00
6 changed files with 24 additions and 12 deletions

View File

@ -40,8 +40,11 @@
>{{ entity.name }}</span>
</div>
<span class="count">
<span>{{ entity.sceneTotal }} scenes</span>
<span
v-if="entity.childrenTotal > 0 || typeof entity.sceneTotal !== 'undefined'"
class="count"
>
<span v-if="typeof entity.sceneTotal !== 'undefined'">{{ entity.sceneTotal }} scenes</span>
<span v-if="entity.type === 'network'">{{ entity.childrenTotal }} channels</span>
</span>
</router-link>

View File

@ -194,12 +194,6 @@ function initEntitiesActions(store, router) {
url
independent
hasLogo
children: childEntitiesConnection {
totalCount
}
connection: scenesConnection {
totalCount
}
}
}
`, {

View File

@ -0,0 +1,15 @@
exports.up = async (knex) => Promise.resolve()
.then(() => knex.schema.alterTable('releases_tags', (table) => {
table.index('release_id');
}))
.then(() => knex.schema.alterTable('movies_scenes', (table) => {
table.index('scene_id');
}));
exports.down = async (knex) => Promise.resolve()
.then(() => knex.schema.alterTable('releases_tags', (table) => {
table.dropIndex('release_id');
}))
.then(() => knex.schema.alterTable('movies_scenes', (table) => {
table.dropIndex('scene_id');
}));

4
package-lock.json generated
View File

@ -1,12 +1,12 @@
{
"name": "traxxx",
"version": "1.204.13",
"version": "1.205.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "traxxx",
"version": "1.204.13",
"version": "1.205.0",
"license": "ISC",
"dependencies": {
"@casl/ability": "^5.2.2",

View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.204.13",
"version": "1.205.0",
"description": "All the latest porn releases in one place",
"main": "src/app.js",
"scripts": {

View File

@ -262,7 +262,7 @@ async function fetchLatest(entity, page, options) {
.select('name')
.where('priority', '>', 7)
.orderByRaw('random()')
.limit(faker.datatype.number({ min: 2, max: 15 }))
.limit(faker.datatype.number({ min: 15, max: 25 }))
.pluck('name');
release.actors = [...actors(release), null]; // include empty actor to ensure proper handling