Commit Graph

53 Commits

Author SHA1 Message Date
HDVinnie
9f58065d30 add: laravel 12 support 2025-05-26 21:08:06 -04:00
Roardom
be3582afe9 fix: autogroup enabling dl rights when a user has active warnings 2025-01-16 08:58:42 +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
b86475a732 add: strict types to all files 2024-05-23 13:58:29 +00:00
Roardom
3723b583b0 update: chunk users in autogroup command
| Change                 | Before | After |
|------------------------|--------|-------|
| Individual to chunking | 355 s  | 56 s  |
| Permission bool to int | 56 s   | 53 s  |
| Timestamp comparison   | 53 s   | 49 s  |

With an empty loop, it takes 33 seconds, the remaining 99% of time is used by the `save()` method (even if values are same as before and no queries are done).
2024-05-08 10:53:43 +00:00
HDVinnie
08abf6d8ca add: request #3692
- closes #3692
2024-05-07 20:21:27 -04:00
HDVinnie
99f5f33283 update: commands 2024-05-06 15:54:19 -04:00
HDVinnie
6dfaa56659 fix: autogroup 2024-04-27 14:50:07 -04:00
HDVinnie
1420eb454c remove: deprecated methods and dbal 2024-04-23 16:35:06 -04:00
EkoNesLeg
693372ed24 (Refactor) AutoGroup User Assignment
Encapsulates the logic for assigning a user to a group and setting permissions within a single if condition; the `else` clause that breaks the loop when a user doesn't meet the conditions for a group is removed, so that promotion is no longer a sequential process. As such, users can can jump straight to Seeder/Archivist ranks.
2024-03-28 09:11:59 +00:00
Roardom
8fc47aecba update: allow customization of group requirements 2024-02-08 14:15:52 +00:00
HDVinnie
aa3dc8ed18 refactor: enums 2024-01-04 03:26:10 -05:00
Roardom
6e10faff3d update: external tracker api
Log a more detailed error, and separate user and group into separate api calls.
2023-12-06 09:17:59 +00:00
Roardom
8127734979 fix: various larastan command issues 2023-08-25 07:58:38 +00:00
Roardom
d7cf34b84a update: use laravel attributes on user model 2023-08-06 02:14:30 +00:00
Roardom
9d4789ba91 refactor: require whitespace before statements 2023-07-07 00:27:13 +00:00
Roardom
6050489c0c fix: auto group not using ints for the group id 2023-05-13 02:26:19 +00:00
Roardom
05ad4c37b9 add: external tracker support 2023-03-27 04:17:30 -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
Roardom
985423e267 update: announce 2023-01-04 05:46:02 -06:00
Roardom
4811a7ceca refactor: simplify user model
Models shouldn't contain custom logic
2022-08-28 01:41:38 -05:00
StyleCI Bot
e292545306 Apply fixes from StyleCI 2022-05-31 22:06:07 +00:00
Shift
be2d37ed6e Use Illuminate\Support\Carbon 2022-05-31 22:05:34 +00:00
HDVinnie
c64b35125b update: auto group command 2022-02-14 03:21:03 -05:00
StyleCI Bot
04338cd3ed Apply fixes from StyleCI 2022-02-14 01:58:31 +00:00
Loki
ee9a9b811c (Update) Improve readability of user groups with enums (#2120)
Co-authored-by: HDVinnie <hdinnovations@protonmail.com>
Co-authored-by: lokithor <lokithor@protonmail.com>
2022-02-13 20:58:02 -05:00
HDVinnie
98521378d2 chore: phpdoc blocks 2022-01-10 17:46:43 -05:00
HDVinnie
dd19889ee6 Merge branch '6.x.x' into Code-Style 2022-01-10 17:03:50 -05:00
HDVinnie
5e01a26c88 optimize: whereIn and whereNotIn queries 2022-01-10 16:25:26 -05:00
HDVinnie
97394c062f chore: adopt type hints 2022-01-07 23:35:33 -05:00
HDVinnie
2a53cea216 refactor: newline after statement 2021-09-28 12:49:46 -04:00
HDVinnie
3407075214 refactor: better php8 usage
- Change simple property init and assign to constructor promotion
- Remove unused variable in catch()
- Change docs types to union types, where possible
2021-05-15 22:41:28 -04:00
HDVinnie
cd5cca00f7 cleanup: group command 2020-12-28 23:10:12 -05:00
HDVinnie
0733269867 update: phpdoc blocks 2020-07-22 16:57:13 -04:00
HDVinnie
a975116218 refactor: preslash simple functions
- Add pre-slash to short named functions to improve performance by almost 30%
-  @see https://stackoverflow.com/questions/55419673/php7-adding-a-slash-to-all-standard-php-functions-php-cs-fixer-rule
2020-07-22 15:09:37 -04:00
HDVinnie
46aa876c06 refactor: add literal separator to numbers
- This is for PHP7.4 + only
- Adds an `_` as thousands separator in numbers
2020-04-14 20:25:07 -04:00
Ben Johnson
a986681184 fix: Fix incorrect byte values
Aside from fixing the units, which mixed binary and metric
inadvertently, this commit adds an interface to a third-party library
that handles the conversion much more elegantly and provides flexibility
 for future needs of a similar nature.
2020-03-06 13:24:23 -05:00
stonedbovines
8920866194 fix: Change (K|M|G|T)B to (K|M|G|T)iB where incorrect 2020-03-06 10:21:35 -05:00
HDVinnie
ad3ec8de19 tests: console commands 2020-02-25 13:01:48 -05:00
HDVinnie
780e0c1f0e chore: update license block 2020-02-12 15:05:34 -05:00
HDVinnie
d889971834 Apply fixes from StyleCI
[ci skip] [skip ci]
2019-11-05 22:40:30 +00:00
HDVinnie
eed3b51c92 (Update) CRUDDY PT.7 🚀 2019-10-25 17:35:14 -04:00
HDVinnie
d3e99d596e Apply fixes from StyleCI
[ci skip] [skip ci]
2019-04-22 23:53:09 +00:00
Morgan Wong
8793413a72 (fix)Ratio condition on user group
Also rearrange the priority sequence 2 groups
2019-04-16 17:42:47 +08:00
HDVinnie
6f8e01fb31 (Update) AutoGroup Command 🚀 2019-03-19 16:30:10 -04:00
HDVinnie
c94a399a7d (Update) AutoGroup Rules 🚀
- removed upper limits
- Seeder and Archivist now go off seedsize instead of seed count which can easily be played by seeding a bunch of small torrents to reap the benifits of these groups.
2019-03-19 13:30:15 -04:00
HDVinnie
8bb397c29c (Update) Standardize Select Queries 🚀 2019-03-13 11:26:20 -04:00
HDVinnie
e0e1aa924b Apply fixes from StyleCI 2019-02-22 13:16:32 +00:00
HDVinnie
3c87845e54 (Update) Namespace models under App\Models 🚀 2019-02-22 08:15:41 -05:00
HDVinnie
0850390860 (Update) Standardize Where Expressions 🚀
- using `Model::where('download', '=', 1)` over`Model::where('download', 1)`
- decided is easier for new devs to understand.
- thanks to @werrpy for helping with the regex to mass update.
2018-12-16 18:32:58 -05:00