18 Commits

Author SHA1 Message Date
Roardom
26e27f7300 fix: quicksearch searching by null throws error
The middleware automatically converts empty strings to null. We want to accept empty strings here for the search to work. Currently, the regex throws an error when a null is passed to it.
2025-07-22 09:26:21 +00:00
Roardom
8618aa1474 update: improve imdb regex
Lookarounds are not performant. Also, fix the client side regex validation to allow links.
2025-07-19 08:22:12 +00:00
Roardom
fb7b320f99 update: cache 1-2-character quicksearch results
Meilisearch seems to be a bit slow sometimes for 1 character searches (300ms delay) since it tries to count the total count accurately. Normally meilisearch has a maxTotalHits of 1000, but we have it set to the number of torrents plus 1000 so that we can have accurate page counts. This causes some additional lag for the quick search which only returns the top 20 results.

Every cache entry uses approximately 12kB from some quick testing, so 2 character is ~30 MB, while 3 characters is ~1.5 GB. Only cache up to 2 characters for now as a result.
2025-04-13 08:20:11 +00:00
Roardom
0e7f3a1c62 fix: allow searching for movies/tv whose names are numbers
Searching for a number is a shortcut to searching by tmdb. Unfortunately, that means searching for movies/tv whose names are number never show up in the quick search results. Change the logic to also search by an exact name match when searching by number to additionally include shows whose names are numbers alongside the tmdb result.
2025-03-31 22:37:19 +00:00
Roardom
9c1282649b fix: extracting first character from utf8 string
The logic wasn't multi-byte safe. Should fix #4599.
2025-03-30 08:30:46 +00:00
Roardom
57fada887f fix: typo in quick search meilisearch query
Incorrect syntax.
2025-03-26 02:44:57 +00:00
Roardom
ea1bdca818 update: store null for metadata id if they do not exist
And make it difficult / encourage users to submit the ids instead of leaving them empty.
2025-03-25 23:19:10 +00:00
Roardom
ae33c74f2b refactor: prefix tmdb metadata models with tmdb
Will help for when there exists other metadata sources available (such as already done for igdb)

Step 4 in cleaner meta fetching code.
2025-03-17 20:41:01 +00:00
Roardom
32cf8da4db refactor: split tmdb into movie_id and tv_id
Step 2 in cleaner meta fetching code.
2025-03-16 22:55:24 +00:00
Roardom
b9dfd3e6dd update: show category name instead of Movie/TV in quick search
For when there exists multiple categories of the same meta.
2025-03-10 11:42:09 +00:00
Roardom
a447269552 refactor: use moderation status enum and cast
For consistency and less magic numbers hard coded everywhere.
2025-02-26 14:23:02 +00:00
Roardom
aa57a375cd update: add fallback images to quicksearch 2025-02-13 23:18:15 +00:00
HDVinnie
9ea8838cc6 add: prefix option 2025-01-01 16:05:58 -05:00
HDVinnie
192b5ed15d chore: remove unused imports that pint is missing 2024-12-01 20:52:32 -05:00
HDVinnie
c63c27924a fix: QuickSearch Controller
- allow searching by TMDB and IMDB ids
2024-10-18 08:30:04 -04:00
HDVinnie
9c2bb17aa1 update: QuickSearch Controller
- refactor logic to simpler approach
2024-10-15 22:48:55 -04:00
HDVinnie
92662ff77e update: QuickSearchController
- use meilisearch php client directly and not scout.
- use MultiSearchFederation
- ability to search by meta ids
2024-10-15 20:38:52 -04:00
HDVinnie
ee8889d0d9 refactor: quicksearch
- refactored from livewire to alpinejs
- this is a crudish draft but is fullly functional
- script should be moved to own alpine component in js dir
- person command and filter is simply a test and works
- fixes long time safari issue when click result just closes search and doesnt direct to URL by following:

@click.prevent Directive: Added @click.prevent="navigateTo(result.url)" to the anchor tag to handle the click event and navigate to the URL.
navigateTo Method: Added a navigateTo method in the quickSearch function to change the window location to the clicked URL.
Event Listener: Updated the init method to add a click event listener that stops propagation and navigates to the URL.
2024-10-07 21:44:04 -04:00