From 45cdd8d45f12e99d3cca6274dcc47a8a2b1f0f02 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2024 10:14:29 -0400 Subject: [PATCH 1/7] fix: #3706 - closes #3706 --- resources/views/user/buttons/user.blade.php | 41 ++++++++++++++++++++- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/resources/views/user/buttons/user.blade.php b/resources/views/user/buttons/user.blade.php index 2f2b993ffe..c3cdd3cee0 100644 --- a/resources/views/user/buttons/user.blade.php +++ b/resources/views/user/buttons/user.blade.php @@ -65,10 +65,47 @@ class="nav-tab__link" @endif - @endif From 76effe3ff3576b4c17f8b422d59551d113351cd0 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2024 14:15:42 +0000 Subject: [PATCH 2/7] Blade Style Change (Prettier Blade CI) --- resources/views/user/buttons/user.blade.php | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/resources/views/user/buttons/user.blade.php b/resources/views/user/buttons/user.blade.php index c3cdd3cee0..70d6aba4ce 100644 --- a/resources/views/user/buttons/user.blade.php +++ b/resources/views/user/buttons/user.blade.php @@ -79,16 +79,13 @@ class="dialog__form" > @csrf

- -

From 6e03edd3a7a560d230daceb36b2334f57f9ad3c8 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2024 10:31:38 -0400 Subject: [PATCH 3/7] fix: #3687 - closes #3687 --- app/Http/Requests/Staff/UpdateGroupRequest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Http/Requests/Staff/UpdateGroupRequest.php b/app/Http/Requests/Staff/UpdateGroupRequest.php index aefafd82e5..ccf7961c45 100644 --- a/app/Http/Requests/Staff/UpdateGroupRequest.php +++ b/app/Http/Requests/Staff/UpdateGroupRequest.php @@ -44,7 +44,7 @@ public function rules(Request $request): array 'required', 'string', ]), - Rule::prohibitedIf($group->system_required), + Rule::prohibitedIf($group->system_required && $request->name !== $group->name), ], 'position' => [ 'required', @@ -150,4 +150,16 @@ public function rules(Request $request): array ], ]; } + + /** + * Get the error messages for the defined validation rules. + * + * @return array + */ + public function messages(): array + { + return [ + 'name.prohibited' => 'You cannot change the name of a system required group.', + ]; + } } From 0794fd21d47055c1a56c890b342e840a68352bba Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2024 10:50:46 -0400 Subject: [PATCH 4/7] fix: #3708 - closes #3708 --- resources/js/unit3d/helper.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resources/js/unit3d/helper.js b/resources/js/unit3d/helper.js index c2976707e6..6e0a77941a 100644 --- a/resources/js/unit3d/helper.js +++ b/resources/js/unit3d/helper.js @@ -74,6 +74,7 @@ class uploadExtensionBuilder { // Remux fix title = title.replace(/( +remux)( *)/i, ' REMUX$2'); if (title.includes(' REMUX')) { + let lowerTitle; title = title.replace(/ Blu-ray /i, ' BluRay '); lowerTitle = title.toLowerCase(); if ( From 17bbd9951468af227794455abacb4409033dba7a Mon Sep 17 00:00:00 2001 From: alkl58 Date: Tue, 2 Apr 2024 17:10:11 +0200 Subject: [PATCH 5/7] Fix Announce: Seeder not getting Leecher Peers --- app/Http/Controllers/AnnounceController.php | 48 ++++++++++++++------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/app/Http/Controllers/AnnounceController.php b/app/Http/Controllers/AnnounceController.php index b9f55151fa..3c4f4e5ae0 100644 --- a/app/Http/Controllers/AnnounceController.php +++ b/app/Http/Controllers/AnnounceController.php @@ -552,34 +552,30 @@ private function checkDownloadSlots(AnnounceQueryDTO $queries, Torrent $torrent, */ private function generateSuccessAnnounceResponse(AnnounceQueryDTO $queries, Torrent $torrent, User $user): string { - // Build Response For Bittorrent Client - // Keys must be ordered alphabetically - $response = 'd8:completei' - .$torrent->seeders - .'e10:downloadedi' - .$torrent->times_completed - .'e10:incompletei' - .$torrent->leechers - .'e8:intervali' - .random_int(self::MIN, self::MAX) - .'e12:min intervali' - .random_int(intdiv(self::MIN * 95, 100), self::MIN) - .'e'; - $peersIpv4 = ''; $peersIpv6 = ''; $peerCount = 0; + $seederCount = 0; + $leecherCount = 0; /** * For non `stopped` event only where either the torrent has at least one leech, or the user is a leech. * We query peers from database and send peerlist, otherwise just quick return. */ - if ($queries->event !== 'stopped' && ($queries->left !== 0 || $torrent->leechers !== 0)) { + if ($queries->event !== 'stopped') { $limit = (min($queries->numwant, 25)); // Get Torrents Peers (Only include leechers in a seeder's peerlist) if ($queries->left === 0) { foreach ($torrent->peers as $peer) { + if ($peer->active && $peer->seeder) { + $seederCount++; + } + + if ($peer->active && ! $peer->seeder) { + $leecherCount++; + } + // Don't include other seeders, inactive peers, invisible peers nor other peers belonging to the same user if ($peer->seeder || !$peer->active || !$peer->visible || $peer->user_id === $user->id) { continue; @@ -602,6 +598,14 @@ private function generateSuccessAnnounceResponse(AnnounceQueryDTO $queries, Torr } } else { foreach ($torrent->peers as $peer) { + if ($peer->active && $peer->seeder) { + $seederCount++; + } + + if ($peer->active && ! $peer->seeder) { + $leecherCount++; + } + // Don't include inactive peers, invisible peers, nor other peers belonging to the same user if (!$peer->active || !$peer->visible || $peer->user_id === $user->id) { continue; @@ -625,6 +629,20 @@ private function generateSuccessAnnounceResponse(AnnounceQueryDTO $queries, Torr } } + // Build Response For Bittorrent Client + // Keys must be ordered alphabetically + $response = 'd8:completei' + .$seederCount + .'e10:downloadedi' + .$torrent->times_completed + .'e10:incompletei' + .$leecherCount + .'e8:intervali' + .random_int(self::MIN, self::MAX) + .'e12:min intervali' + .random_int(intdiv(self::MIN * 95, 100), self::MIN) + .'e'; + if ($peersIpv6 === '') { return $response.'5:peers'.\strlen($peersIpv4).':'.$peersIpv4.'e'; } From 31e36fa8f8f3b9992f19bfe52ea71153ca3c8a0a Mon Sep 17 00:00:00 2001 From: LostRager Date: Tue, 2 Apr 2024 22:26:24 +0200 Subject: [PATCH 6/7] (Fix) Welcome back message not showing up correctly --- app/Providers/FortifyServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/FortifyServiceProvider.php b/app/Providers/FortifyServiceProvider.php index 5b9a0e9e38..dfcbd3f026 100644 --- a/app/Providers/FortifyServiceProvider.php +++ b/app/Providers/FortifyServiceProvider.php @@ -66,7 +66,7 @@ public function toResponse($request): \Illuminate\Http\RedirectResponse $user->save(); return to_route('home.index') - ->withSuccess('auth.welcome-restore'); + ->withSuccess(trans('auth.welcome-restore')); } // Check if user has read the rules From b6ac151db2cd2306fcf8ad9f9bff87465e10059b Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Tue, 2 Apr 2024 19:13:38 -0400 Subject: [PATCH 7/7] update: unit3d config --- config/unit3d.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/config/unit3d.php b/config/unit3d.php index eca66b8530..c6ffcc0481 100755 --- a/config/unit3d.php +++ b/config/unit3d.php @@ -21,7 +21,7 @@ | */ - 'powered-by' => 'Powered By UNIT3D Community Edition v8.0.1', + 'powered-by' => 'Powered By UNIT3D Community Edition v8.0.2', /* |-------------------------------------------------------------------------- @@ -43,7 +43,7 @@ | */ - 'version' => 'v8.0.1', + 'version' => 'v8.0.2', /* |--------------------------------------------------------------------------