Commit Graph

111 Commits

Author SHA1 Message Date
Roardom cbcf34f29b update: don't query database in filter api
Better database performance using raw pagination since it doesn't have to run the data through eloquent resources (bad when there's thousands of TorrentFiles) or query the database to count the count of torrents inside the database for the total item count.
2024-09-02 10:03:38 +00:00
Roardom 7b965b0581 fix: cast relevant values to boolean before updating meilisearch
Fixes searching for torrents which have boolean casts already when upserted via the scout observer but are searched via `1` or `0` in the search filters.
2024-08-29 11:19:03 +00:00
HDVinnie 4d863b7c89 Merge branch '8.x.x' into pr/4029 2024-08-26 20:15:35 -04:00
Roardom 5a9ae37921 update: use system user id constant in more places 2024-08-26 09:28:44 +00:00
Roardom 07dc581a74 fix: don't exclude non-approved torrents from meilisearch index 2024-08-18 23:26:13 +00:00
Roardom 30be9a2608 update: use integer primary key for meilisearch 2024-08-18 21:19:23 +00:00
Roardom f321e1c889 fix: meilisearch index updates not using makeAllSearchableUsing 2024-08-18 16:59:55 +00:00
Roardom 6d01a6aacd fix: remove release_year from meilisearch
This field has been recently removed from the unit3d schema.
2024-08-18 15:32:42 +00:00
HDVinnie 1087dff233 Merge branch '8.x.x' into meilisearch-3 2024-08-18 01:19:43 -04:00
HDVinnie f92194281c refactor: release years
- remove the release_year column from the torrents table and just search the movie/tv tables instead
2024-08-13 22:18:38 -04:00
Roardom acf25f9ebf fix: sync torrents to meilisearch command
`makeAllSearchableUsing()` is not called when calling `->searchable()` so we need to do that manually ourselves.
2024-08-12 09:21:06 +00:00
Roardom cb41027faf fix: scout json array decoding 2024-08-12 07:19:42 +00:00
Roardom 872d28d9c0 fix: larastan relations 2024-08-09 07:33:56 +00:00
Roardom fa35e4e5c0 add: use meilisearch to search torrents 2024-08-06 02:15:25 +00:00
HDVinnie 7469a11ea1 add: #4006
- closes #4006
2024-07-28 21:18:09 -04:00
HDVinnie 3ad3bb992b PHP Style Change (Laravel Pint CI) 2024-07-19 03:43:14 +00:00
HDVinnie 8ad0097fc9 fix: HasFactory types 2024-07-18 23:42:13 -04:00
HDVinnie eddad86406 fix: phpstan errors
- this commit tackles more phpstan errors from the baseline.
- the 2024_06_19_210338_update_colum_types.php migration will have more added to it. This PR is draft until more baaseline errors are closed.
2024-06-19 21:19:02 -04:00
HDVinnie c4cd52e23b fix: multiple bugs
- adds laravel 11 casts support to phpstan https://github.com/larastan/larastan/blob/2.x/UPGRADE.md#upgrading-to-296-from-295
- fixes multiple bugs found by phpstan
- removes dead code in torrent filter trait
- ignores three new files in phpstan.neon temp until debugged for timeouts
2024-06-19 13:43:59 -04:00
HDVinnie 2378a9f977 add: soft deletes to torrents
- this adds laravel's soft deletes functionality to torrents.
2024-06-13 20:58:19 -04:00
Roardom 68645ef825 fix: types for livewire comments 2024-06-09 04:05:01 +00:00
Roardom cd8d348b8e fix: strict types
1. Need to use the path of a file and not the object.
2. When a torrent is uploaded, the upload form sends a string for the tmdb and the model is saved with a string and it's the database that does the conversion. We need to cast the string to an int if we want to reuse the model without rehydrating.
3. Some of the first_air_date and last_air_date are null and need to be checked to make sure they follow the correct format.
2024-05-27 06:09:35 +00:00
Roardom 12903f64ac fix: strict type issues
Don't pass null into functions that don't accept null.
2024-05-23 17:40:16 +00:00
Roardom 2e57262e97 fix: strict types phpstan errors 2024-05-23 15:38:35 +00:00
Roardom b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie 51fa8ec46b update: laravel
- Laravel 11 introduces a new default application structure with fewer default files. Namely, new Laravel applications contain fewer service providers, middleware, and configuration files.

However, it is not recommend that Laravel 10 applications upgrading to Laravel 11 attempt to migrate their application structure, as Laravel 11 has been carefully tuned to also support the Laravel 10 application structure.
2024-04-23 16:06:37 -04:00
Roardom a37f414145 update: normalize post tips and torrent tips 2024-02-26 09:33:32 +00:00
Roardom 18675b57f1 update: sync peer counts asynchronously
Makes announce processing job code easier to deal with. There is negligible performance loss (<5%) by querying the peer count realtime on the torrents and torrent pages.
2024-02-23 10:30:29 +00:00
HDVinnie 8a03bec818 add: model docblocks
- this resolves some larastan property issues but in return has revealed quite a few issues with our castings and such. baseline has been regenerated so we can work through them. The properties in docblocks are in order and match everything in DB schema wise.
2024-02-07 16:39:43 -05:00
Roardom f11d1bb804 fix: phpstan level 7 errors in Models 2024-01-07 17:21:12 +00:00
HDVinnie b3f0386149 cleanup: pt.1 2023-10-12 22:30:52 -04:00
Roardom f2066f4441 fix: add type hints to models 2023-08-26 07:43:07 +00:00
Roardom 2ca7adbbe5 fix: various larastan controller issues 2023-08-25 09:13:18 +00:00
Roardom 8127734979 fix: various larastan command issues 2023-08-25 07:58:38 +00:00
Roardom c4fccde317 fix: various larastan model issues 2023-08-25 04:21:38 +00:00
Roardom 42c23aa0b5 fix: Resource php doc blocks 2023-08-25 03:07:58 +00:00
Roardom 091965d5d3 fix: larastan not recognizing model properties created from DB::raw() 2023-08-25 02:02:06 +00:00
Roardom 450a475593 fix: casts type 2023-08-06 02:21:15 +00:00
Roardom bb5255d968 Revert "update: cache personal freeleech existence instead of its value"
This reverts commit b48a9222d1.
2023-07-28 06:08:55 +00:00
Roardom b48a9222d1 update: cache personal freeleech existence instead of its value
We only cache it if it exists, so let's not query it every single time it doesn't exist.
We don't remove it from the hourly run command yet so that currently existing freeleeches can be deleted.
2023-07-25 22:48:56 +00:00
HDVinnie 06ff54fd18 Merge pull request #2951 from Roardom/rename-graveyard-to-resurrections
(Refactor) Rename `graveyard` to `resurrections`
2023-07-23 22:39:36 -04:00
Roardom 9c0c474a9a refactor: rename graveyard to resurrections
Make everything consistent with the "plural noun" style
2023-07-24 01:07:35 +00:00
Roardom faf4d37ac0 refactor: drop unused genre_torrent table 2023-07-24 00:05:16 +00:00
Roardom 741adef615 add: moderation scopes 2023-07-10 04:20:40 +00:00
Roardom 222d2dee59 refactor: cruddify playlists
Use cruddy routes and controllers. Use route model binding. Use mass assignment. Use form requests. Use pivot model.
2023-07-07 03:18:13 +00:00
Roardom 0000838d8b refactor: cruddy torrents
Separate torrents into cruddy route names. Route model binding isn't possible due to the global scope on unapproved torrents. Use form requests. Simplify the controller flow where possible.
2023-07-07 03:18:13 +00:00
Roardom 196e09eac6 add: mass assignment to staff user controller 2023-07-07 00:27:19 +00:00
Roardom 9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom ea9fd6c9c9 update: swap infohash from ascii-encoded hex to binary 2023-04-08 08:02:04 +00:00
Roardom dcd4f0b578 update: combine torrent searches 2023-02-22 03:53:20 -06:00