Compare commits

...

2 Commits

Author SHA1 Message Date
DebaucheryLibrarian 0cbb985945 1.198.7 2021-08-23 01:54:24 +02:00
DebaucheryLibrarian bb384029ac Disabled eager searching except for entities. Updating movie search document on store. 2021-08-23 01:54:22 +02:00
5 changed files with 18 additions and 8 deletions

View File

@ -1,7 +1,10 @@
<template> <template>
<div class="networks"> <div class="networks">
<div class="content-inner"> <div class="content-inner">
<SearchBar :placeholder="`Search ${channelCount} channels in ${entities.length} networks`" /> <SearchBar
:placeholder="`Search ${channelCount} channels in ${entities.length} networks`"
:eager="true"
/>
<span <span
v-if="done && entities.length === 0" v-if="done && entities.length === 0"
@ -14,7 +17,7 @@
> >
<Entity <Entity
v-for="entity in entities" v-for="entity in entities"
:key="`entity-tile-${entity.slug}`" :key="entity.parent ? `entity-tile-${entity.parent.slug}-${entity.slug}` : `entity-tile-${entity.slug}`"
:entity="entity" :entity="entity"
/> />
</div> </div>

View File

@ -1,13 +1,13 @@
<template> <template>
<form <form
class="search" class="search"
@submit.prevent="search" @submit.prevent="() => search()"
> >
<input <input
v-model="query" v-model="query"
:placeholder="placeholder || 'Search'" :placeholder="placeholder || 'Search'"
class="query" class="query"
@input="search" @input="() => search(true)"
> >
<button <button
@ -18,8 +18,10 @@
</template> </template>
<script> <script>
function search() { function search(typing) {
this.$router.replace({ query: { query: this.query || undefined } }); if (!typing || this.eager) {
this.$router.replace({ query: { query: this.query || undefined } });
}
} }
function resetQuery() { function resetQuery() {
@ -32,6 +34,10 @@ export default {
type: String, type: String,
default: null, default: null,
}, },
eager: {
type: Boolean,
default: false,
},
}, },
data() { data() {
return { return {

2
package-lock.json generated
View File

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

View File

@ -1,6 +1,6 @@
{ {
"name": "traxxx", "name": "traxxx",
"version": "1.198.6", "version": "1.198.7",
"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": {

View File

@ -450,6 +450,7 @@ async function storeMovies(movies) {
const storedMovies = await bulkInsert('movies', curatedMovieEntries, ['entity_id', 'entry_id'], true); const storedMovies = await bulkInsert('movies', curatedMovieEntries, ['entity_id', 'entry_id'], true);
const moviesWithId = attachReleaseIds(movies, storedMovies); const moviesWithId = attachReleaseIds(movies, storedMovies);
await updateMovieSearch(moviesWithId.map(movie => movie.id));
await associateReleaseMedia(moviesWithId, 'movie'); await associateReleaseMedia(moviesWithId, 'movie');
return moviesWithId; return moviesWithId;