114 Commits

Author SHA1 Message Date
Roardom
02b7fa9a19 fix: include default stylesheet users in stats count 2025-06-09 08:14:35 +00:00
Roardom
913f339825 update: add characters typed user stat 2025-05-29 01:26:07 +00:00
HDVinnie
9f58065d30 add: laravel 12 support 2025-05-26 21:08:06 -04:00
Anabol
0dfee4c175 update: exlcude system bot specifically
Co-authored-by: Roardom <roardom@protonmail.com>
2025-05-25 01:46:39 -05:00
Anabol
f7d10a126e update: chatroom comment
Co-authored-by: Roardom <roardom@protonmail.com>
2025-05-25 01:44:50 -05:00
unit3d-bot
ffed85ef7d automation: laravel pint ci 2025-05-24 09:00:24 +00:00
AnabolicsAnonymous
5d5c3412e5 update: exclude private messages and bot from messages stat 2025-05-24 03:57:05 -05:00
AnabolicsAnonymous
58cf5da261 add: user chatbox message stats 2025-05-24 03:25:36 -05:00
Roardom
9d478c928b remove: public view of all users in group 2025-04-05 10:31:11 +00: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
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
9ab8ba18e5 refactor: reduce usage of numeric strings 2024-08-26 10:14:52 +00:00
Roardom
a0299daa16 refactor: use eloquent relations directly 2024-08-18 03:26:41 +00:00
Roardom
f5195a000c update: lazy load stats index 2024-08-11 05:29:57 +00:00
Roardom
8f65d5095e update: improve client stats
Group client versions by their respective client, count number of peers per client, and link to peer search for staff.
2024-08-10 07:11:32 +00:00
Roardom
d00475778b update: normalize user settings
Use a 1-1 relation. Cache it indefinitely to reduce queries for every http request. This will make it much easier to add additional user settings for various site features without sacrificing clean code or performance.
2024-05-26 10:42:00 +00:00
Roardom
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
HDVinnie
08abf6d8ca add: request #3692
- closes #3692
2024-05-07 20:21:27 -04:00
HDVinnie
8fafbefb53 update: StatsController.php
- show all groups but staff
2024-03-27 06:48:11 -04:00
HDVinnie
18d5ff83db update: StatsController.php 2024-03-27 06:35:52 -04:00
HDVinnie
b9e0094458 chore: pint 2024-03-25 22:42:08 -04:00
Jay Sizzla
160bb26c8b Add perks to the groups requirements view 2024-03-21 16:27:41 +01:00
Jay Sizzla
1a5169f4cf Add groups requirements table 2024-03-17 11:42:03 +01:00
Roardom
b274347313 refactor: use whereRelation when possible
All changes were tested for performance regressions. None of the included changes were affected. However, the code that uses `whereIn('category_id', Category::select('id')->where('movie_meta', '=', 1)` saw a ~10% performance loss so should not be changed.
2024-03-03 15:56:02 +00:00
Roardom
44b1063887 add: upload snatches to extra stats 2024-02-01 06:34:06 +00:00
HDVinnie
ea0018a862 PHP Style Change (Laravel Pint CI) 2024-01-16 18:05:08 +00:00
HDVinnie
b0d2157434 Merge pull request #3163 from Roardom/simplify-client-stats-controller
(Refactor) Simplify client stats controller
2023-10-08 13:25:19 -04:00
HDVinnie
954586253b Merge pull request #3162 from Roardom/extra-stats-eager-loading
(Update) Use eager loading in group stats
2023-10-08 13:24:52 -04:00
Roardom
99b45bd7d4 refactor: simplify client stats controller 2023-10-07 07:14:39 +00:00
Roardom
8036a8d5e8 update: use eager loading in group stats 2023-10-07 07:11:58 +00:00
Roardom
c9628dc5f0 fix: stats query for disabled/pruned/banned users 2023-10-07 07:07:48 +00:00
Roardom
2ca7adbbe5 fix: various larastan controller issues 2023-08-25 09:13:18 +00:00
Roardom
1bc31fda9d fix: only use active peers for stats and bon 2023-08-03 07:28:16 +00:00
Roardom
c554e29abe update: keep peers that stopped announcing for longer
Now that we upsert history records without first selecting them, we can't rely on storing a peer's last uploaded/downloaded values in the history record to determine the user's uploaded/downloaded delta between the last announce. If a user has internet issues for a brief period of time but their client continues working, then their change of upload/download between the two announces needs to be kept track of. This is usually kept track of in the peer record, but if the peer is deleted after 2 hours of not announcing, then their last uploaded/downloaded data is deleted with it. We previously stored this data in the history table to handle such cases but this became erroneous if the user had multiple peers on a torrent. This new solution keeps the peers in the database for 2 days before concluding that the peer isn't coming back and deletes the peer permanently. After which point, a new peer will be created and an assumption is made that they uploaded/downloaded 0 data within their downtime.
2023-07-29 05:12:35 +00:00
Roardom
b6b4313bdc update: various database performance improvements
Use eager loading where necessary and add a few indexes. The existing index on private_messages for sender_id and read was probably a typo and intended for receiver_id. The first 3 tables indexes are added to are used for queries ran on every page load: namely the new pm, new notification and warnings indicator in the navbar. Additionally, another index on genre_movie proved useful for finding all the genres when given a movie id. Perhaps, another index for finding all movies within a genre would be good as well, but will leave that for a future optimization if deemed necessary.
2023-07-17 00:21:08 +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
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
a29b34ab0b add: theme stats 2022-11-27 22:52:32 -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
HDVinnie
906a39a6ee Merge branch '6.x.x' into seedtime-stats 2022-08-27 08:58:19 -04:00
Roardom
542a314700 add: seedtime stats 2022-08-27 01:44:19 -05:00
Roardom
3b6ab71ed7 add: seedsize stats 2022-08-27 01:24:40 -05:00
HDVinnie
80eece3174 fix: #2298
- closes #2298
2022-07-06 16:08:18 -04:00
Shift
be2d37ed6e Use Illuminate\Support\Carbon 2022-05-31 22:05:34 +00:00
HDVinnie
b49028a1c4 update: stats controller 2022-03-30 09:24:26 -04:00
innocente205
46225226ee (Update) StatsController
Double counting some seeds
2022-03-28 20:56:49 +07:00
HDVinnie
dd19889ee6 Merge branch '6.x.x' into Code-Style 2022-01-10 17:03:50 -05:00