187 Commits

Author SHA1 Message Date
Roardom
6043fae6b0 fix: eager loading on torrent request 2025-08-25 06:02:17 +00:00
Roardom
a3063fb8c5 refactor: normalize request votes
Cleans up the code and better normalization practice. Should this ever be a performance issue (such as sorting by vote count on request search page), then it'd probably be better to use meilisearch, but currently with 60k bounties, the query time only takes ~300ms compared to the 40ms previously.
2025-06-22 00:49:41 +00:00
Roardom
702ac45cb6 fix: normalize request claims
Errors happen when requests have the claimed flag but don't actually have a claim record (or vice-versa).
2025-06-20 03:08:01 +00:00
Roardom
69363b7d7a remove: seasons, episodes, guest_stars
These tables and models aren't used anymore. Seasons and episodes aren't used because most torrents do not follow tmdb's episode and season ordering, but instead follow tvdb's, so it is more accurate to specify the episode and season number directly. Guest stars haven't been used for a long time, if ever.

Fixes #4565
2025-04-03 09:05:19 +00:00
Roardom
926747e905 update: collection on similar meta and collection posters
Show all movies in a collection that the current movie is in, in the similar meta. Also show movie posters instead of a collection card in the relations panel on the torrent page. Reorganize the relations so that plurals are correct and match the relation stored in the database. Even though there can be only one collection per movie as defined by tmdb, that's not the way the tables are stored and the queries are done, so use plural naming for now.
2025-04-02 09:16:32 +00:00
Roardom
e4c07b5f52 fix: rely on if tmdb/igdb exists to determine meta
Instead of blindly using the respective tmdb associated with the torrent's category. Also fixes wishlist notifications if a user has a wishlist entry with a null tmdb and a user uploads a torrent without a tmdb.
2025-03-26 21:35:41 +00:00
Roardom
36086a087c fix: edit request page
There's an defined variable here from a copy-paste error that forgot to include the rest of the alpinejs logic.
2025-03-23 23:09:06 +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
24ed359288 fix: auto fetch igdb metadata on torrent/request create/update 2025-03-15 13:47:59 +00:00
Roardom
8fde78124b refactor: save igdb games to the database
Step 1 towards cleaner meta fetching code.

Users with a game category must run `php artisan fetch:meta` after migration.
2025-03-11 19:48:25 +00:00
Roardom
b2e29cfcf0 fix: migrate boolean columns to tinyint(1)
These columns were previously tiny ints without the (1) display width or regular ints, or smallints. They should all be tinyint(1).
2025-02-19 06:25:21 +00:00
Roardom
868ad35aa4 refactor: swap magic RedirectResponse withX('Y') to with('X', 'Y')
Allows ctrl+clicking to access the underlying function unlike the previous magic implementation. Probably also negligibly faster.

Swapped all instances of `>withSuccess(` -> `>with('success', `, `>withWarning(` -> `>with('warning', `, and `>withInfo(` -> `>with('info', ` with ide's find and replace.
2025-01-21 16:05:11 +00:00
HDVinnie
192b5ed15d chore: remove unused imports that pint is missing 2024-12-01 20:52:32 -05:00
Roardom
47647bd481 fix: request deletion permissions
If we don't allow users to edit their request if someone else has added their bon to it, surely we shouldn't allow them to delete the request either.
2024-08-23 05:22:26 +00:00
Roardom
64a60089d9 refactor: treat sprintf as native function
This breaks the pint CI currently. This is probably due to the next version of php (8.4) adding opcache optimizations to sprintf and our config requiring pre-slashing native functions.
2024-08-09 21:08:26 +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
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
Roardom
98c32a38f3 update: remove request bon transactions
This data is already stored in the requests and bounty tables. At this point, the name and comment fields are duplicates of each other and don't need to both be kept.
2024-02-26 09:33:33 +00:00
Roardom
8f0bc33058 update: limit user edit interval for torrents/requests 2024-01-28 12:02:09 +00:00
HDVinnie
656647649f Revert "cleanup: pt.2"
This reverts commit 33d9927abd.
2023-10-12 23:11:20 -04:00
HDVinnie
33d9927abd cleanup: pt.2 2023-10-12 22:41:46 -04:00
HDVinnie
b3f0386149 cleanup: pt.1 2023-10-12 22:30:52 -04:00
Roardom
1348ffeaa8 fix: reorder seedbonus decrement so error is generated first 2023-08-31 09:20:50 +00:00
Roardom
2ca7adbbe5 fix: various larastan controller issues 2023-08-25 09:13:18 +00:00
Roardom
6e6f551367 fix: various larastan livewire issues 2023-08-25 06:45:41 +00:00
Roardom
229eed8091 refactor: use _id suffix on bon_transactions foreign keys 2023-07-22 21:30:50 +00:00
Roardom
7f318e08d6 fix: requirement of ids on request creation
IDs irrelevant to the category should not be required.
2023-07-10 06:42: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
70e3505886 update: cruddy requests
Separate requests into cruddy routes. Use route model binding. Allow forfeit of award if request approval is revoked. Use form requests.
2023-07-07 03:18:13 +00:00
Roardom
3b46c7819b refactor: use route model binding for user routes 2023-07-07 00:28:47 +00:00
Roardom
9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom
d2e36c368e refactor: reduce temporary variables passed to views 2023-06-19 23:25:40 +00:00
Roardom
1fa4a3e506 refactor: swap sorting in laravel to ordering in the database 2023-06-19 23:18:40 +00:00
Roardom
b5493c5642 refactor: swap where('id', '=', ) for find() 2023-06-19 23:18:40 +00:00
HDVinnie
da845a3e49 fix: Requests achievements
- Requests filled anonymously count towards achievements when they should not.
2023-06-02 23:49:22 -04:00
Roardom
34c5abf019 refactor: request controller 2023-04-28 01:31:44 +00:00
Roardom
a65b83e52a update: cruddy request views 2023-04-21 21:49:35 +00:00
Roardom
4c93353f03 update: cruddy request controller 2023-04-21 21:49:35 +00:00
Roardom
5d3ef3be48 fix: upload and request buttons on meta when value is missing 2023-03-21 02:12:08 -05:00
Roardom
7e1bb1ad5b update: new metadata redesign 2023-03-19 18:48:55 -05:00
HDVinnie
f4ebee885c update: lint 2023-02-03 22:23:00 -05:00
HDVinnie
472c820f99 update: UNIT3D linting
- github action updated with new ruleset in pint.json
- codebase linted with new ruleset
- contributors can now run `./vendor/bin/pint`
- action workflow will auto correct any lint issues upon commit/opened pull request
2023-02-02 08:02:34 -05:00
HDVinnie
1076ee03a0 update: RequestController
- allow user to use full urls
2023-01-31 11:46:24 -05:00
Roardom
fdceea6aa9 fix: bon transactions 2023-01-03 17:27:26 -06:00
Roardom
fc0235e39b update: fulfill requests with torrent id instead of info_hash 2022-12-23 16:07:47 -06:00
HDVinnie
d21503a9b6 update: RequestController 2022-12-15 17:16:49 -05:00
HDVinnie
2ca429c4ce Revert "PSR12 Linting"
This reverts commit 7e65e1d589.
2022-09-11 19:51:58 -04:00
HDVinnie
7e65e1d589 PSR12 Linting 2022-09-11 23:50:41 +00:00
StyleCI Bot
e292545306 Apply fixes from StyleCI 2022-05-31 22:06:07 +00:00