Commit Graph

324 Commits

Author SHA1 Message Date
AnabolicsAnonymous be200c5db1 update: use eloquent's when() instead of if statements 2025-08-24 15:07:07 -05:00
AnabolicsAnonymous 4544f6cc59 update: use findorfail for request retrieval in request controller 2025-08-24 14:44:50 -05:00
AnabolicsAnonymous 7591906037 update: request integer methods 2025-08-24 14:03:16 -05:00
AnabolicsAnonymous c12c2024ad fix: use whereNotNull for spellcheck CI 2025-08-22 18:15:31 -05:00
unit3d-bot a41fe736fd automation: laravel pint ci 2025-08-22 23:04:19 +00:00
AnabolicsAnonymous 75e3200381 add: torrent request API controller 2025-08-22 18:02:05 -05:00
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
HDVinnie 5600e18fb9 Merge pull request #4861 from Roardom/fix-null-quicksearch
(Fix) Quicksearch searching by null throws error
2025-07-22 17:29:00 -04:00
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 820946c2b6 refactor: chatbox user chat status
Only save the user's chat status in one place, and sync it with the server when it's updated.
2025-07-20 10:18:17 +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 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 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 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 57fada887f fix: typo in quick search meilisearch query
Incorrect syntax.
2025-03-26 02:44:57 +00:00
HDVinnie 7eea77c3e3 Merge pull request #4580 from Roardom/nullable-meta-ids
(Update) Store null for metadata id if they do not exist
2025-03-25 21:47:34 -04: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 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
HDVinnie 2a3a718dfe Merge pull request #4553 from Roardom/game-db
(Refactor) Save igdb games to the database
2025-03-12 21:29:17 -04: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 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 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 6e2c8f569d Merge pull request #4492 from Roardom/moderation-status-enum
(Refactor) Use moderation status enum and cast
2025-03-05 06:16:23 -05: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 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 ab0851f73a update: upgrade to phpstan 2 2025-02-24 17:19:39 +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
HDVinnie c48d062a75 Merge pull request #4469 from Roardom/normalize-featured 2025-02-18 10:32:14 -05:00
HDVinnie ae1d16f237 Merge pull request #4479 from Roardom/improve-quick-search 2025-02-15 08:19:53 -05:00
Roardom aa57a375cd update: add fallback images to quicksearch 2025-02-13 23:18:15 +00:00
Roardom 8e455ef448 fix: api chat controller json return types
Makes static analysis happy.
2025-02-11 06:06:17 +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 9ea8838cc6 add: prefix option 2025-01-01 16:05:58 -05:00
HDVinnie e71b28c588 Merge pull request #4358 from Roardom/modq-order
(Fix) Order torrent creation from most to least important
2024-12-02 08:38:47 -05:00