756 Commits

Author SHA1 Message Date
Roardom
fd228b2584 fix: stop removal of bumped torrents updating entire torrents table
Eloquent automatically updates the updated_at timestamp, even if the bumped_at field doesn't change. This results in meilisearch reimporting all the torrents once every hour, which is not necessary and causes increased load.
2025-08-18 15:18:26 +00:00
Roardom
48adfce1af fix: group cache
Laravel returns numeric strings when an int is saved to cache, which breaks a lot of the logic here. Fixed by removing cache everywhere except rss and middleware, and in those two spots, caching the whole group and not just the id of the group.
2025-07-19 11:59:00 +00:00
Roardom
9bdbe9764c refactor: cached select group id by slug queries
Uses a better key. Doesn't use the cache when it's not needed.
2025-07-14 18:15:29 +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
HDVinnie
99800ce14e Revert "Merge pull request #4774 from Roardom/laravel11-app-structure-3"
This reverts commit d38964cbd7, reversing
changes made to 5c00b12e7c.
2025-06-16 22:41:15 -04:00
Roardom
12b9a30b0c refactor: migrate to laravel 11 app structure 2025-06-13 22:31:20 +00:00
Roardom
725d13b0c4 refactor: remove unused ticket/comment events/listeners/notifications
These aren't currently being used. If this functionality is to be completed, it should be easy enough to find the code through the git history again. However, UNIT3D doesn't really use events and it'd be better for most of the notification sending to be inline (except the stale one of course).
2025-06-10 07:28:34 +00:00
HDVinnie
9f58065d30 add: laravel 12 support 2025-05-26 21:08:06 -04:00
Roardom
d1fe7d362f fix: occasional tmdb ssl errors break fetch:meta command
Sometimes, there is an ssl error from tmdb (Once every few hundred thousand http requests). When this happens, because the jobs are processed synchronously to avoid dos'ing tmdb, it throws an exception and kills the command. Instead, allow the http requests to be retried, and skip the fetch if it still fails after 3 retries.
2025-05-14 07:34:25 +00:00
Roardom
1962ef2c04 update: implement proper tmdb rate limiting
Allows the fetch meta command to work without hitting rate limits on tmdb. Tmdb's rate limit is ~40 per second, but each movie/tv has to send additional http request for each collection, network, company and person, so I figured 2 per second was safe.
2025-05-08 12:01:35 +00:00
HDVinnie
f8440083a6 chore: larastan ci 2025-04-14 21:26:13 -04:00
unit3d-bot
167d1feacc automation: laravel pint ci 2025-04-15 01:00:33 +00:00
HDVinnie
9890b245a9 refactor: git updater 2025-04-14 20:57:22 -04:00
Roardom
56e7639d88 fix: don't fetch meta of null ids
fixes #4597
2025-04-03 07:51:48 +00:00
Roardom
90d7d76a86 fix: wrong column select in fetch meta
Regression from #4563. Fixes #4593.
2025-03-29 11:47:36 +00:00
HDVinnie
4601a50913 fix: git updater php version 2025-03-27 08:10:54 -04:00
Roardom
7998c4a204 add: setting to automatically unbookmark torrents upon completion
Only every 15 minutes for now instead of upon immediate completion, but it makes the code much easier to implement.
2025-03-23 21:17:11 +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
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
HDVinnie
de367ca58e Merge pull request #4532 from Roardom/inline-clients
(Update) Inline client stats query
2025-03-07 07:46:46 -05:00
Roardom
933efb785b update: inline client stats query
The query only takes 6 seconds on my local untuned machine. Caching it for an hour is probably fine, we have worse queries out there, and indexing isn't an option since this table is write-heavy. Reduces overall complexity and prevents blank page after cache is reset.
2025-03-06 16:53:06 +00:00
Roardom
44eed9d685 fix: featured torrent removal
We don't have a featured attribute anymore, we save it in its own table.
2025-03-05 15:12:25 +00:00
HDVinnie
7879b437ec Merge pull request #4497 from Roardom/public-private
(Fix) Store user-uploaded files in private directories
2025-02-25 07:42:38 -05:00
Roardom
1af1862229 fix: store user-uploaded files in private directories
Filenames were randomized for a few of these to prevent public access, but it's still much better to put user-uploaded files behind auth.
2025-02-24 16:03:01 +00:00
Roardom
d0048e355d fix: sql search by featured torrents
This portion was missed in the refactor to normalize featured torrents in #4469
2025-02-23 07:31:47 +00:00
HDVinnie
7c92646df7 Merge pull request #4487 from Roardom/typed-tasks
(Refactor) Swap command signatures for class string in scheduler
2025-02-20 18:06:44 -05:00
Roardom
6e73b4f8f2 refactor: swap command signatures for class string in scheduler
Allows ctrl+clicking in IDE.
2025-02-20 03:55:31 +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
fcd9bb9f75 Merge pull request #4471 from Roardom/clean-torrent-files 2025-02-13 08:21:18 -05:00
Roardom
42488abe6c update: only delete upsert data after successful upsertion 2025-02-13 09:53:04 +00:00
Roardom
bd422e1cdc add: command to clean torrent files
Useful when migrating sites from other platforms to sanitize any potentially sensitive data.
2025-02-11 05:52:19 +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
6a103cee97 refactor: use laravel notifications for system user private messages 2025-02-02 18:48:27 +00:00
Roardom
93e1c438b8 fix: order of operations in bon earnings calculation 2025-02-02 10:58:04 +00:00
HDVinnie
9968d312ee Merge pull request #4452 from Roardom/remove-dead-code
(Refactor) Remove dead code in auto deactivate warning command
2025-01-28 12:02:08 -05:00
Roardom
7bbd4723f6 refactor: remove dead code in auto deactivate warning command 2025-01-25 05:00:27 +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
5d06cc5add Merge pull request #4428 from Roardom/fix-autogroup
(Fix) Autogroup enabling dl rights when a user has active warnings
2025-01-20 08:26:58 -05:00
HDVinnie
d474ee3be4 update: php8.4 support
- makes unit3d php8.4 + required
- fixes multiple implicitly to explicit nullable type
- dependency updates
- github action updates
- carbon 2 needs to move to carbon 3 in separate pr
2025-01-20 00:04:35 -05:00
Roardom
d922562f86 update: make bonus point allocation more customizable 2025-01-16 21:40:25 +00:00
Roardom
be3582afe9 fix: autogroup enabling dl rights when a user has active warnings 2025-01-16 08:58:42 +00:00
HDVinnie
9ea8838cc6 add: prefix option 2025-01-01 16:05:58 -05:00
HDVinnie
192b5ed15d chore: remove unused imports that pint is missing 2024-12-01 20:52:32 -05:00
Roardom
0e4bcb570d refactor: use ANSI-compatible syntax for raw database queries 2024-11-02 04:26:49 +00:00
Roardom
e65f1aa50c fix: bumped_at should equate created_at when reset 2024-10-24 07:41:06 +00:00
Roardom
adab854de7 update: reset bumped torrent status after 1 week
There are way too many bumped torrents and overuse of the feature is desensitizing its functionality.
2024-10-21 01:46:50 +00:00
Roardom
e740769299 fix: use bool for torrent/group refundable instead of int 2024-10-20 10:41:30 +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