203 Commits

Author SHA1 Message Date
Roardom
e1486613bb security: randomize info_hash upon upload and hide it from users
Require a user to download a .torrent file in order to view the info_hash.
2025-08-20 12:27:12 +00:00
Roardom
46bfccc8b7 refactor: use enums for auth guards, middleware groups, and rate limits 2025-06-22 20:00:02 +00:00
AnabolicsAnonymous
3cbb2e5340 update: add a moderation opt in check to torrent api 2025-04-29 07:18:01 -05:00
Roardom
7d13e1fb56 fix: allow nullable meta ids in api torrent upload validation 2025-03-26 22:37:49 +00:00
Roardom
f16b775151 fix: api torrent upload nullable metadata ids
The falsey to nullable conversion has to be done here as well.
2025-03-26 05:47:31 +00:00
Roardom
8257629a10 fix: api upload by modo always announcing as featured 2025-03-24 22:28:01 +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
HDVinnie
09f8404ada Merge pull request #4559 from Roardom/igdb-int 2025-03-16 17:32:40 -04:00
Roardom
7889c71618 refactor: use unsigned int for igdb
Use the correct type for the external id.

Step 3 in cleaner meta fetching code.
2025-03-16 20:58:30 +00:00
HDVinnie
49c31d3515 Merge pull request #4557 from Roardom/game-meta-auto 2025-03-16 16:30:29 -04:00
Roardom
24ed359288 fix: auto fetch igdb metadata on torrent/request create/update 2025-03-15 13:47:59 +00:00
Roardom
494afca0d7 fix: torrents uploaded by mods via api automatically featured 2025-03-13 21:32:34 +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
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
HDVinnie
2cbdd3553a Merge pull request #4513 from Roardom/fix-storage
(Fix) Torrent files storage disk
2025-03-04 21:42:38 -05:00
Roardom
2357db36a3 fix: torrent files storage disk
Regression from #4497
2025-03-01 03:54:31 +00:00
HDVinnie
7c4a0e84ac PHP Style Change (Laravel Pint CI) 2025-02-27 13:36:46 +00:00
Jay Sizzla
ba1818be0c Fix spell CI 2025-02-27 13:33:54 +00:00
Jay Sizzla
28a8779bcd Allow internal options for internals in non-internal group
Internals that are not member of the internal group (e.g. Editor) but not Moderator+ should still be able to set the internal options on their uploads.
Also, replace all group->is_internal with internals->exists in app & views.
2025-02-27 13:33:26 +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
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
Roardom
e7c369002e fix: order torrent creation from most to least important 2024-12-01 19:51:20 +00:00
HDVinnie
2529f646ee Merge pull request #4250 from Roardom/torrent-bool-refundable 2024-10-20 09:55:01 -04:00
Roardom
e740769299 fix: use bool for torrent/group refundable instead of int 2024-10-20 10:41:30 +00:00
Roardom
e75de5d546 update: allow editors to use sql searching 2024-10-19 18:43:09 +00:00
Roardom
85eb7c366d fix: provide null for next page when no more results 2024-10-10 08:00:14 +00:00
Roardom
3e5f475a56 fix: broken api compatbility when no torrents found
There was always a null check here to return 404 when no torrents are found. But this null check was always comparing against a paginator instance... which would never be true. So when I changed it to an isEmpty when I changed the query from a database query to a meilisearch query, and thought that was the correct thing to do to make sure a 404 is still returned, that was incorrect, because a 404 was never returned in the first place. An empty array is proper here.
2024-10-08 11:33:14 +00:00
Roardom
d9f834d949 fix: fix backwards compatibility of api datetime format
The original format included microseconds as well.
2024-09-22 10:00:12 +00:00
Roardom
f8b31e2cdd fix: auth caching api between users
Don't cache rsskeys of users and provide the responses to other users.
2024-09-22 10:00:12 +00:00
Roardom
b313751581 Revert "revert: #4131"
This reverts commit 1bd9fbab12.
2024-09-22 10:00:12 +00:00
HDVinnie
1bd9fbab12 revert: #4131 2024-09-05 08:23:28 -04:00
HDVinnie
70c0a3e2ad Merge pull request #4143 from Roardom/fix-genre-array-string
(Fix) Genres array should be string
2024-09-04 22:37:48 -04:00
Roardom
a2d0e69428 fix: genres array should be string
Ideally should be array... but then when it exists it should be array too... and it should only be changed on a major release.
2024-09-05 02:25:17 +00:00
Roardom
49d4ece261 fix: null coalesce if torrent is missing category/type/resolution
If the torrent does not have an assigned category, type, or resolution, return a null category_id, type_id, and/or resolution_id from the api.
2024-09-05 01:05:46 +00:00
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
HDVinnie
4d863b7c89 Merge branch '8.x.x' into pr/4029 2024-08-26 20:15:35 -04:00
HDVinnie
931c99c690 Merge pull request #4083 from Roardom/system-user-id
(Update) Use system user id constant in more places
2024-08-26 16:51:18 -04:00
Roardom
5a9ae37921 update: use system user id constant in more places 2024-08-26 09:28:44 +00:00
Roardom
d1465ae390 remove: unused category num_torrents column 2024-08-25 14:14:24 +00:00
HDVinnie
1087dff233 Merge branch '8.x.x' into meilisearch-3 2024-08-18 01:19:43 -04:00
Roardom
dd538f73b0 fix: use the "all" matching strategy in meilisearch
Resembles the sql search better.
2024-08-12 11:58:50 +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
fa35e4e5c0 add: use meilisearch to search torrents 2024-08-06 02:15:25 +00:00
Roardom
2e91e1157f fix: some user group permissions
These permissions were never meant to be directly edited by staff. They should never have been added to the staff user edit page as it just caused confusion when the settings reset at the daily group change. I've now added these settings to the group directly and allow the settings on the user edit page to override the group settings. I refrained from fixing the can_download permission for now, because so many different things affect it and it will need at 3 separate permissions to control everything it does. Trying to fix it will take much more effort than what can be fixed today. Because of this, I removed the setting from the user edit page to reduce confusion from staff who don't realize it is controlled by the scheduler. Relevant issue: #1820.
2024-07-26 22:35:45 +00:00
Roardom
4b3b864fa4 refactor: use DTO to modularize torrent searching 2024-07-12 14:40:27 +00: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