Compare commits

...

2 Commits

4 changed files with 9 additions and 6 deletions

View File

@ -13,7 +13,10 @@ import FilterBar from '../header/filter-bar.vue';
import Releases from '../releases/releases.vue';
async function fetchReleases() {
this.releases = await this.$store.dispatch('fetchReleases', { limit: 50 });
this.releases = await this.$store.dispatch('fetchReleases', {
limit: (this.$route.query && this.$route.query.limit && Number(this.$route.query.limit)) || 30,
});
this.$store.commit('setCache', {
target: 'home',
releases: this.releases,

2
package-lock.json generated
View File

@ -1,6 +1,6 @@
{
"name": "traxxx",
"version": "1.102.6",
"version": "1.102.7",
"lockfileVersion": 1,
"requires": true,
"dependencies": {

View File

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

View File

@ -378,8 +378,8 @@ async function updateReleasesSearch(releaseIds) {
sites.name || ' ' ||
sites.slug || ' ' ||
replace(CAST(releases.date AS VARCHAR), '-', ' ') || ' ' ||
string_agg(actors.name, ' ') || ' ' ||
string_agg(tags.name, ' ')
string_agg(coalesce(actors.name, ''), ' ') || ' ' ||
string_agg(coalesce(tags.name, ''), ' ')
) as document
FROM releases
JOIN sites ON releases.site_id = sites.id
@ -391,7 +391,7 @@ async function updateReleasesSearch(releaseIds) {
GROUP BY releases.id, sites.name, sites.slug;
`, [releaseIds]);
if (documents.row?.length > 0) {
if (documents.rows?.length > 0) {
const query = knex('releases_search').insert(documents.rows).toString();
await knex.raw(`${query} ON CONFLICT (release_id) DO UPDATE SET document = EXCLUDED.document`);
}