121 Commits

Author SHA1 Message Date
Roardom
dd8e489d2f refactor: modularize torrent grouping logic 2025-10-21 10:37:50 +00:00
Roardom
8d3f575915 update: reset page to 1 when search query changes
Just for torrents and requests for now, but this could be expanded into a trait and used everywhere at a later point in time.
2025-09-25 05:17:30 +00:00
Roardom
8b02fe24a7 fix: deduplicate grouped torrent search eager loads 2025-09-18 07:05:36 +00:00
HDVinnie
a1e45a4dca add: ability to hide adult content
- closes #4866
- closes #4867
2025-09-17 14:35:00 -04:00
HDVinnie
bf0b98fd5f Merge pull request #4957 from Roardom/cache-flexible 2025-09-12 13:22:11 -04:00
Roardom
2a3270e748 update: use cache()->flexible() to improve response times 2025-09-12 01:43:47 +00:00
Roardom
222e5ed808 fix: eager loads on meta popups on torrent list
Brings page load time down from 700ms back to reasonable 200ms levels.
2025-09-11 08:39:12 +00:00
Roardom
88dd691716 update: use glow effect around peer counts as torrent activity indicator
Requires less screen space, and easier to tell from a glance.
2025-09-07 21:22:28 +00:00
Roardom
c2bee5d7ec remove: thanks count from torrent icons
Significantly cleans up the listing and isn't needed to see in bulk. Some sites disable thanks completely and don't want to see it. I plan to also move the comment count and the seeding/leeching indicators elsewhere in a separate PR to clean it up further. The count is still shown on the individual torrent page itself.
2025-09-07 17:14:49 +00:00
Roardom
61c0c29e9f refactor: use php 8.4 property hooks for livewire computed properties
Less magic, and works well. Saw this trick in the Laracon US 2025 Livewire presentation.
2025-08-16 10:48:12 +00:00
Roardom
4358b5def2 fix: torrent group search including irrelevant torrents in groups
When selecting the torrents after determining which groups to select from, all torrents within the groups were selected instead of only the torrents matching the search filters. Fix by applying the meilisearch filters to the torrents, plucking their ids, then fetching torrents matching those ids from mysql.

Regression from #4851
2025-07-20 08:35:51 +00:00
HDVinnie
8b271da7ca Merge pull request #4852 from Roardom/fix-imdb-regex 2025-07-19 08:14:20 -04: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
0622ba3d29 fix: grouped search pagination
Caused by the mysql and meilisearch filters not matching. The mysql filters were being applied to the torrent fetching, even though meilisearch was intended to be used to find the works, and mysql was to be used to find all torrents belonging to each word by its id. The main problem was any field using LIKE didn't match with meilisearch's search engine. This was fixed by appropriate conditionally applying the sql filters. Additionally, the torrents were filtering by `imdb > 0`, but meilisearch was including null imdbs when searching by `>` unlike mysql. Fixed that by changing it to `IS NOT NULL` instead.
2025-07-19 07:07:50 +00:00
Roardom
89f291390b fix: search for tmdb != 0 instead of tmdb > 0
We changed the indexes in #4458 to not use orderable filters for this field anymore.
2025-07-14 21:57:44 +00:00
Roardom
3de7b17381 refactor: swap null coalescing for default model in user settings
Cleans up the code to remove null coalescing on user_settings when it doesn't exist. Sometimes null was unintentionally being cast to false. Allowing the user_setting remain optional allows the site administration to configure and change defaults for their users without it affecting users who have explicitly chosen their existing user settings.

Alternative to #4789
2025-06-20 03:00:48 +00:00
HDVinnie
e97f662ec4 add: torrent health counts to torrent search 2025-05-30 09:47:21 -04:00
Roardom
d422fa2541 fix: poster view in torrent search
This value isn't in the group by clause.
2025-03-25 23:47:43 +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
8647ee7b1a update: allow torrent moderators to use sql search 2025-03-11 11:31:05 +00:00
HDVinnie
a364cf3954 Merge branch '8.x.x' into stream-sd 2025-03-09 00:14:06 -05:00
Roardom
5a6259cea7 remove: sd content and stream optimized flags
SD content is represented by the resolutions table now instead of this flag. Most people prefer web-dls over stream-optimized encodes these days.
2025-03-09 03:33:32 +00:00
Roardom
3b0f00053f fix: thanks icons on grouped view
Regresssion from #4514.
2025-03-06 19:02:43 +00:00
HDVinnie
7f53eef6dc Merge pull request #4499 from Roardom/fix-grouped-slightly
(Fix) Various slight grouped torrent layout changes
2025-03-05 01:10:16 -05:00
HDVinnie
8fff964cea Merge pull request #4515 from Roardom/phpstan-fixes
(Fix) Phpstan fixes
2025-03-04 21:48:57 -05:00
HDVinnie
0e22d9ec64 Merge pull request #4514 from Roardom/fix-grouped-icons
(Fix) Grouped torrent relations
2025-03-04 21:43:00 -05:00
Roardom
8122c6a5bc fix: phpstan pagination generics 2025-03-02 09:14:09 +00:00
Roardom
89c2821262 fix: grouped torrent relations
The aggregates need to be executed before `select` or else `select` removes the aggregates from the query. Also made all the grouped torrent queries consistent and added aggregates where they were missing.
2025-03-02 05:48:15 +00:00
Roardom
a9fed85b82 update: speed up torrent grouping
Shaves 110ms (from 150 ms to 40ms) from the logic to group torrents per tmdb and media type. It's not much compared to the rest of the request (~2s), but it's something. I could've got it down to 11 ms if laravel didn't have high overhead when accessing attributes, but it was 70ms before I started using ->getAttributeValue so that says something there.
2025-02-26 14:25:31 +00:00
Roardom
854b69c03b update: allow sorting by created_at in grouped view 2025-02-25 12:50:42 +00:00
Roardom
cbbd074a43 fix: featured torrent icon
Regression from #4469

The select argument in the query was missing in a few places.
2025-02-20 16:11:14 +00:00
Roardom
df9fa5004c fix: normalize torrent featured flag
When the featured flag goes out of sync with the featured_torrents table (for reasons still unknown), the torrent is permanently labeled as freeleech, while 100% of traffic is always credited.
2025-02-10 17:47:12 +00:00
Roardom
604b7e1937 add: spell check ci
Just an initial portion for now fixing incorrect text and preventing future incorrect text. Eventually, I'd like to fix everything still listed under "ignoredWords" in cspell.json.
2025-01-24 11:30:34 +00:00
HDVinnie
eed0fbd6a6 Merge pull request #4443 from Roardom/fix-return-type
(Fix) Remove wrong return type in doc block
2025-01-20 08:29:44 -05:00
Roardom
6c8504a219 fix: remove wrong return type in doc block 2025-01-20 12:22:52 +00:00
Roardom
e2b3447842 update: use meilisearch for search in grouping layout 2025-01-20 08:47:28 +00:00
HDVinnie
9ea8838cc6 add: prefix option 2025-01-01 16:05:58 -05:00
HDVinnie
fc7272bbb1 PHP Style Change (Laravel Pint CI) 2024-12-24 01:59:20 +00:00
Roardom
0e4bcb570d refactor: use ANSI-compatible syntax for raw database queries 2024-11-02 04:26:49 +00:00
HDVinnie
161031c157 fix: Invalid value type at page, expected a positive integer, but found a string
- This ensures that the page parameter is correctly cast to an integer before being passed to the Meilisearch API.
2024-10-23 00:13:32 -04:00
Roardom
d46690aacc fix: meilisearch torrent search incomplete filter 2024-10-21 12:45:13 +00:00
Roardom
9267dac649 fix: mediainfo and description search
There's no easy way of adding these to meilisearch right now. Indexing them is inefficient and causes multi-second queries. It would be useful to use the `CONTAINS` operator to search these, but that meilisearch feature is still experimental and we should wait until it's stable before using it.
2024-10-20 22:24:59 +00:00
HDVinnie
2cd11b4fb6 Merge pull request #4237 from Roardom/tmdb-rating-sorting
(Update) Allow sorting torrent list by tmdb rating
2024-10-20 17:31:20 -04:00
Roardom
60a909bf33 update: allow sorting torrent list by tmdb rating 2024-10-20 10:01:04 +00:00
Roardom
e75de5d546 update: allow editors to use sql searching 2024-10-19 18:43:09 +00:00
Roardom
c623f29eea fix: torrents sorted incorrectly when using meilisearch
We need to sort the torrents after they've been fetched from the database to match the same order that meilisearch returned.

Fixes regression from #4236.
2024-10-18 01:53:52 +00:00
Roardom
5b7bf9fd2e update: use meilisearch for torrent search by default
Using scout directly doesn't work because when increasing the maxTotalHits in meilisearch, scout will use the max instead of just fetching the current page. Meilisearch seems to handle a max of 200k torrents fine on its own, with 12ms latency when e.g. filtering by type down to 38000 totalHits. Run `php artisan scout:sync-index-settings`, followed by `php artisan auto:sync_torrents_to_meilisearch` after updating.
2024-10-17 07:21:33 +00:00
HDVinnie
798633f7ca Merge pull request #4029 from Roardom/meilisearch-3 2024-08-31 18:42:28 -04:00
Roardom
62b49a4d2b update: order by season/episode descending
Puts most recent episodes at the top for convenience.
2024-08-30 03:19:43 +00:00