Skip to content

(Release) v8.3.5 #4399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 40 commits into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
193c280
fix: eager loading regression from #2908
HDVinnie Dec 4, 2024
3be790d
Merge pull request #4367 from HDInnovations/Moderation-Eager-Loading
HDVinnie Dec 5, 2024
e6dd5cf
add: new pending torrents page
HDVinnie Dec 6, 2024
2582a63
Merge pull request #4368 from HDInnovations/Pending-Torrents
HDVinnie Dec 6, 2024
4230d62
Add latest Torrent and Request comments to home page
Obi-Wana Dec 9, 2024
68e9e51
PHP Style Change (Laravel Pint CI)
HDVinnie Dec 9, 2024
5e3b38f
Merge pull request #4371 from Obi-Wana/add-latest-torrent-comments-to…
HDVinnie Dec 9, 2024
db9cf0e
fix: UserResource
HDVinnie Dec 11, 2024
56f99af
Only show title when the user is not set to anonymous
Obi-Wana Dec 13, 2024
9239b1e
Merge pull request #4375 from Obi-Wana/fix-anon-on-latest-torrent-com…
HDVinnie Dec 13, 2024
97b0588
fix: only show year in similar torrent deletion
Roardom Dec 8, 2024
6a34d76
fix: conversation delete button
Roardom Dec 16, 2024
1e342d9
add: edit forum permissions when creating/editing group
Roardom Dec 3, 2024
1acecbd
fix: `session` and `announce` database environment keys
Roardom Dec 16, 2024
3eeeaff
add: monthly top 10
Roardom Dec 16, 2024
3fed3b1
Merge pull request #4369 from Roardom/similar-delete-year
HDVinnie Dec 17, 2024
455ba75
Merge pull request #4380 from Roardom/group-permissions
HDVinnie Dec 17, 2024
c10def4
Merge pull request #4381 from Roardom/fix-conversation-delete
HDVinnie Dec 17, 2024
c0f6f63
Merge pull request #4382 from Roardom/fix-announce-db
HDVinnie Dec 17, 2024
6c17e1c
Merge pull request #4383 from Roardom/monthly-top10
HDVinnie Dec 18, 2024
8bab6cf
fix: every home block needs to have its own class
Roardom Dec 17, 2024
2edfd6c
update: increase zip limits
Roardom Dec 18, 2024
65bb3a4
Merge pull request #4384 from Roardom/fix-latest-comments
HDVinnie Dec 18, 2024
8cdc1c5
update: dependencies
HDVinnie Dec 23, 2024
79f2755
Blade Style Change (Prettier Blade CI)
HDVinnie Dec 23, 2024
fc7272b
PHP Style Change (Laravel Pint CI)
HDVinnie Dec 24, 2024
e1e859c
fix: receiving chat pms from other users while in chat pm
Roardom Dec 24, 2024
11dccc9
Merge pull request #4387 from Roardom/fix-zip
HDVinnie Dec 27, 2024
bd5c00e
Merge pull request #4390 from HDInnovations/Dependencies
HDVinnie Dec 27, 2024
2eeff69
Merge pull request #4391 from Roardom/chatbox-pm
HDVinnie Dec 27, 2024
2b0a14a
Revert "Blade Style Change (Prettier Blade CI)"
HDVinnie Dec 27, 2024
ec0a1ae
update: dependencies
HDVinnie Dec 27, 2024
7754815
update: phpstan-baseline.neon
HDVinnie Dec 27, 2024
6a789d9
update: movie client
HDVinnie Dec 27, 2024
b058ad8
PHP Style Change (Laravel Pint CI)
HDVinnie Dec 27, 2024
24b8df2
Merge pull request #4394 from HDInnovations/Dependecies
HDVinnie Dec 27, 2024
a7e6b99
fix: #4393 Undefined variable $user
HDVinnie Dec 27, 2024
fd88414
Merge pull request #4395 from HDInnovations/Bug-4393
HDVinnie Dec 27, 2024
4035514
chore: cleanup repo
HDVinnie Dec 27, 2024
62521e8
chore: update readme
HDVinnie Dec 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,060 changes: 0 additions & 2,060 deletions CHANGELOG.md

This file was deleted.

5 changes: 0 additions & 5 deletions FUNDING.yml

This file was deleted.

61 changes: 25 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,78 +8,67 @@
<a href="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/compile-assets-test.yml/badge.svg?branch=master"><img src="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/compile-assets-test.yml/badge.svg?branch=master" /></a>
<a href="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/larastan.yml/badge.svg?branch=master"><img src="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/larastan.yml/badge.svg?branch=master" /></a>
<a href="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/prettier-blade.yml/badge.svg?branch=master"><img src="https://github.com/HDInnovations/UNIT3D-Community-Edition/actions/workflows/prettier-blade.yml/badge.svg?branch=master" /></a>
<a href="https://polar.sh/HDInnovations"><img src="https://polar.sh/embed/seeks-funding-shield.svg?org=HDInnovations" /></a>
</p>

<p align="center">
🎉 <b>A Big Thanks To All Our <a href="https://github.com/HDInnovations/UNIT3D-Community-Edition/graphs/contributors">Contributors</a> and <a href="https://polar.sh/HDInnovations">Subscribers</a></b> 🎉
🎉 <b>A Big Thanks To All Our <a href="https://github.com/HDInnovations/UNIT3D-Community-Edition/graphs/contributors">Contributors</a> and <a href="https://square.link/u/VjB1CNfm">Donors</a></b> 🎉
</p>

## 📝 Table of Contents

1. [Introduction](#introduction)
2. [Installation](#installation)
3. [Updating](#updating)
4. [Support UNIT3D](#support)
5. [Funding Issues/Requests](#funding)
6. [Special Thanks](#thanks)
4. [Contributing](#contributing)
5. [License](#license)
6. [Services](#services)
7. [Donations](#donations)
8. [Discord Support](#discord)
9. [Special Thanks](#thanks)


## <a name="introduction"></a> 🧐 Introduction

We have been developing a Private Torrent Tracker Software called `UNIT3D`. This is a PHP software based on Laravel 11, Livewire and AlpineJS. It is MySQL Strict Mode Compliant, and PHP 8.3 Ready. The code is well-designed and follows the PSR-2 coding style. It uses an MVC Architecture to ensure clarity between logic and presentation. As a hashing algorithm of Bcrypt or Argon2 is used, to ensure a safe and proper way to store the passwords for the users. A lightweight Blade Templating Engine. Caching System Supporting: "apc,” "array,” "database,” "file," "memcached," and "redis" methods. Eloquent and much more!
We have been developing a Private Torrent Tracker Software called `UNIT3D`. This is a PHP software based on Laravel 11, Livewire and AlpineJS. It is MySQL Strict Mode Compliant, and PHP 8.3 Ready. It uses an MVC Architecture to ensure clarity between logic and presentation.

## <a name="installation"></a> 🖥️ Installation

Check it out here for more information: https://github.com/HDInnovations/UNIT3D-Installer

### Demo Data

Use this command to generate demo users and torrents for testing purposes in a dev environment:
## <a name="updating"></a> 🖥️ Updating

`php artisan demo:seed`
To update your installation to the latest version, run the following command. This will pull the latest changes from the repository and update your instance:

## <a name="updating"></a> 🖥️ Updating
`php artisan git:update`

## <a name="contributing"></a> 🤝 Contributing

## <a name="support"></a> ✨ Support UNIT3D
Please read [CONTRIBUTING.md](https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.

You can support our work if you are enjoying UNIT3D. Sponsors will recieve an email with a Discord invite link to UNIT3Ds Discord server which is used for support and more.
## <a name="license"></a> 📜 License

<a href="https://polar.sh/HDInnovations"><picture><source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=HDInnovations&label=Subscribe&darkmode"><img alt="Subscribe on Polar" src="https://polar.sh/embed/subscribe.svg?org=HDInnovations&label=Subscribe"></picture></a>
This project is licensed under the AGPL v3.0 License - see the [LICENSE](https://github.com/HDInnovations/UNIT3D-Community-Edition/blob/master/LICENSE.md) file for details.

Some folks have asked me if it's possible to do a donation via Crypto. Yes!
```
Monero (XMR) - 85WrXRzmbF9fTp9UHLHhhEVeF5VBCHSen9suSvK4FkKqcyhXeikS1zM4u5gfa5gyQV9dS8yuoDwMGBJ1rQ8w1CWkJXN9kSo
## <a name="services"></a> 🛠️ Services

Bitcoin (BTC) - 3HUVkv3Q8b5nbxa9DtXG1dm4RdTJaTFRfc
HDInnovations offers a variety of services to help you with your UNIT3D instance. We offer services such as installation, updating, server tuning, dependency tuning, themes and custom plugin development. For more information, please visit our email us at [hdinnovations@protonmail.com](mailto:hdinnovations@protonmail.com?subject=[Services]%20UNIT3D%20)

Bitcoin Cash (BCH) - qp3wgpnwzpj4v9sq90wflsca8p5s75glrvga9tweu2
## <a name="donations"></a> 💰 Donations

Ether (ETH) - 0x5eFF42F65234aD9c6A0CA5B9495f3c6D205bBC27
If you would like to support the development of UNIT3D, please consider donating to keep the project alive. For more information, please email us at [hdinnovations@protonmail.com](mailto:hdinnovations@protonmail.com?subject=[Funding]%20UNIT3D%20)

ETC - 0xd644C7C7009eC3824f3305ff6C7E2Ee90497d56e
<a href="https://square.link/u/VjB1CNfm" target="_blank"><img alt="unit3d-donate.png" src="public/img/unit3d-donate.png" width="200px"/></a>&nbsp;&nbsp;&nbsp;
<img alt="unit3d-qr-code.png" src="public/img/unit3d-qr-code.png" width="169px"/>

Litecoin (LTC) - MDLKyHzupt1mchuo8mrjW9mihkKp1LD4nG
## <a name="discord"></a> 📞 Discord Community

USDC - 0xB32102d9104d2bfd0D4E3E4069618ADD985a4e2E
We have a Discord server for support and general discussion. This is a private server, and you will need to be invited to join. There is a small fee to join the server to help support the development of UNIT3D. For more information, please email us at [hdinnovations@protonmail.com](mailto:hdinnovations@protonmail.com?subject=[Discord]%20UNIT3D%20)

USDT (ERC-20) - 0x24c79c41EEAd9d81203ee567fE4bA3a6c81374DB
## <a name="thanks"></a> 🎉 Shoutouts

DOGE - DJ78fQspiu879y3adLbTZVSFABKhKqHE7B
```
<a href="https://scoutapm.com/?utm_source=github&utm_medium=referral&utm_campaign=opensource_referral"><img src="https://i.postimg.cc/g29XCJDh/Logo-rounded-square-495x495-1.png" height="50px;"></a>
<a href="https://www.jetbrains.com/?from=UNIT3D"><img src="https://i.imgur.com/KgDXZV8.png" height="50px;"></a>

## <a name="funding"></a> ✨ Funding issues and feature requests

<a href="https://polar.sh/HDInnovations"><img src="https://polar.sh/embed/fund-our-backlog.svg?org=HDInnovations" /></a>

## <a name="thanks"></a> 🎉 Special Thanks

<a href="https://scoutapm.com/?utm_source=github&utm_medium=referral&utm_campaign=opensource_referral"><img src="https://i.postimg.cc/g29XCJDh/Logo-rounded-square-495x495-1.png" height="50px;"></a>
<a href="https://www.jetbrains.com/?from=UNIT3D"><img src="https://i.imgur.com/KgDXZV8.png" height="50px;"></a>
<a href="https://www.themoviedb.org/"><img src="https://www.themoviedb.org/assets/2/v4/logos/v2/blue_square_2-d537fb228cf3ded904ef09b136fe3fec72548ebc1fea3fbbd1ad9e36364db38b.svg" height="50px;"></a>
<a href="https://github.com"><img src="https://i.imgur.com/NVWhzrU.png" height="50px;"></a>
<a href="https://laravel.com"><img src="https://i.postimg.cc/cCDBswfK/1200px-Laravel-svg.png" height="50px;"></a>
<a href="https://laravel-livewire.com"><img src="https://i.postimg.cc/jjsNyBbh/Livewire.png" height="50px;"></a>
<a href="https://alpinejs.dev"><img src="https://i.postimg.cc/28pWk0M1/alpinejs-logo.png" height="50px;"></a>
1 change: 1 addition & 0 deletions app/Enums/Occupation.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* NOTICE OF LICENSE.
*
Expand Down
1 change: 1 addition & 0 deletions app/Enums/UserGroup.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* NOTICE OF LICENSE.
*
Expand Down
1 change: 1 addition & 0 deletions app/Http/Controllers/AnnounceController.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* NOTICE OF LICENSE.
*
Expand Down
12 changes: 12 additions & 0 deletions app/Http/Controllers/HomeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
namespace App\Http\Controllers;

use App\Models\Article;
use App\Models\Comment;
use App\Models\FeaturedTorrent;
use App\Models\Group;
use App\Models\Poll;
Expand Down Expand Up @@ -104,6 +105,17 @@ public function index(Request $request): \Illuminate\Contracts\View\Factory|\Ill
->take(5)
->get(),
),
'comments' => cache()->remember(
'latest_comments',
$expiresAt,
fn () => Comment::query()
->with('user', 'user.group', 'commentable')
->whereHasMorph('commentable', [\App\Models\Torrent::class])
->orWhereHasMorph('commentable', [\App\Models\TorrentRequest::class])
->latest()
->take(5)
->get(),
),
'featured' => cache()->remember(
'latest_featured',
$expiresAt,
Expand Down
38 changes: 22 additions & 16 deletions app/Http/Controllers/Staff/GroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
use App\Http\Controllers\Controller;
use App\Http\Requests\Staff\StoreGroupRequest;
use App\Http\Requests\Staff\UpdateGroupRequest;
use App\Models\Forum;
use App\Models\ForumCategory;
use App\Models\Group;
use App\Models\ForumPermission;
use App\Services\Unit3dAnnounce;
use Illuminate\Support\Str;

Expand All @@ -45,25 +44,24 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie
*/
public function create(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
{
return view('Staff.group.create');
return view('Staff.group.create', [
'forumCategories' => ForumCategory::query()
->with([
'forums' => fn ($query) => $query->orderBy('position')
])
->orderBy('position')
->get(),
]);
}

/**
* Store A New Group.
*/
public function store(StoreGroupRequest $request): \Illuminate\Http\RedirectResponse
{
$group = Group::create(['slug' => Str::slug($request->name)] + $request->validated());

foreach (Forum::pluck('id') as $collection) {
ForumPermission::create([
'forum_id' => $collection,
'group_id' => $group->id,
'read_topic' => false,
'reply_topic' => false,
'start_topic' => false,
]);
}
$group = Group::create(['slug' => Str::slug($request->validated('group.name'))] + $request->validated('group'));

$group->permissions()->upsert($request->validated('permissions'), ['forum_id', 'group_id']);

Unit3dAnnounce::addGroup($group);

Expand All @@ -77,7 +75,13 @@ public function store(StoreGroupRequest $request): \Illuminate\Http\RedirectResp
public function edit(Group $group): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
{
return view('Staff.group.edit', [
'group' => $group,
'group' => $group,
'forumCategories' => ForumCategory::query()
->with([
'forums' => fn ($query) => $query->orderBy('position')
])
->orderBy('position')
->get(),
]);
}

Expand All @@ -86,7 +90,9 @@ public function edit(Group $group): \Illuminate\Contracts\View\Factory|\Illumina
*/
public function update(UpdateGroupRequest $request, Group $group): \Illuminate\Http\RedirectResponse
{
$group->update(['slug' => Str::slug($request->name)] + $request->validated());
$group->update(['slug' => Str::slug($request->validated('group.name'))] + $request->validated('group'));

$group->permissions()->upsert($request->validated('permissions'), ['forum_id', 'group_id']);

cache()->forget('group:'.$group->id);

Expand Down
6 changes: 3 additions & 3 deletions app/Http/Controllers/Staff/ModerationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\Vie
return view('Staff.moderation.index', [
'current' => now(),
'pending' => Torrent::withoutGlobalScope(ApprovedScope::class)
->with(['user.group', 'category', 'type', 'resolution', 'category'])
->with(['user.group', 'category', 'type', 'resolution'])
->where('status', '=', Torrent::PENDING)
->get(),
'postponed' => Torrent::withoutGlobalScope(ApprovedScope::class)
->with(['user.group', 'moderated.group', 'category', 'type', 'resolution', 'category'])
->with(['user.group', 'moderated.group', 'category', 'type', 'resolution'])
->where('status', '=', Torrent::POSTPONED)
->get(),
'rejected' => Torrent::withoutGlobalScope(ApprovedScope::class)
->with(['user.group', 'moderated.group', 'category', 'type', 'resolution', 'category'])
->with(['user.group', 'moderated.group', 'category', 'type', 'resolution'])
->where('status', '=', Torrent::REJECTED)
->get(),
]);
Expand Down
34 changes: 34 additions & 0 deletions app/Http/Controllers/TorrentPendingController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<?php

declare(strict_types=1);

/**
* NOTICE OF LICENSE.
*
* UNIT3D Community Edition is open-sourced software licensed under the GNU Affero General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D Community Edition
*
* @author HDVinnie <hdinnovations@protonmail.com>
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
*/

namespace App\Http\Controllers;

use App\Models\Scopes\ApprovedScope;
use App\Models\Torrent;

class TorrentPendingController extends Controller
{
public function index(): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
{
return view('torrent.pending', [
'torrents' => Torrent::withoutGlobalScope(ApprovedScope::class)
->with(['category', 'type', 'resolution'])
->where('status', '=', Torrent::PENDING)
->orWhere('status', '=', Torrent::POSTPONED)
->get(),
]);
}
}
2 changes: 1 addition & 1 deletion app/Http/Controllers/User/TorrentZipController.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public function show(Request $request, User $user): \Illuminate\Http\RedirectRes
set_time_limit(1200);

// Extend The Maximum Memory Limit
ini_set('memory_limit', '1024M');
ini_set('memory_limit', '2048M');

// Authorized User
abort_unless($request->user()->is($user), 403);
Expand Down
2 changes: 1 addition & 1 deletion app/Http/Livewire/LaravelLogViewer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ final public function logFiles()
}

/**
* @return \Illuminate\Pagination\LengthAwarePaginator<\Illuminate\Support\Collection<string|int, mixed>>
* @return LengthAwarePaginator<\Illuminate\Support\Collection<string|int, mixed>>
*/
#[Computed]
final public function entries(): LengthAwarePaginator
Expand Down
4 changes: 2 additions & 2 deletions app/Http/Livewire/PersonCredit.php
Original file line number Diff line number Diff line change
Expand Up @@ -285,8 +285,8 @@ function ($tv) {
}

/**
* @param \Illuminate\Support\Collection<int, \App\Models\Torrent> $torrents
* @return \Illuminate\Support\Collection<string, \Illuminate\Support\Collection<int, \App\Models\Torrent>>
* @param \Illuminate\Support\Collection<int, Torrent> $torrents
* @return \Illuminate\Support\Collection<string, \Illuminate\Support\Collection<int, Torrent>>
*/
private function groupByTypeAndSort($torrents): \Illuminate\Support\Collection
{
Expand Down
10 changes: 5 additions & 5 deletions app/Http/Livewire/SimilarTorrent.php
Original file line number Diff line number Diff line change
Expand Up @@ -355,8 +355,8 @@ final public function torrents(): \Illuminate\Support\Collection
}

/**
* @param \Illuminate\Support\Collection<int, \App\Models\Torrent> $torrents
* @return \Illuminate\Support\Collection<string, \Illuminate\Support\Collection<int, \App\Models\Torrent>>
* @param \Illuminate\Support\Collection<int, Torrent> $torrents
* @return \Illuminate\Support\Collection<string, \Illuminate\Support\Collection<int, Torrent>>
*/
private function groupByTypeAndSort(\Illuminate\Support\Collection $torrents): \Illuminate\Support\Collection
{
Expand Down Expand Up @@ -423,9 +423,9 @@ final public function deleteRecords(): void
$names = [];
$users = [];
$title = match (true) {
$this->category->movie_meta => ($movie = Movie::find($this->tmdbId))->title.' ('.$movie->release_date.')',
$this->category->tv_meta => ($tv = Tv::find($this->tmdbId))->name.' ('.$tv->first_air_date.')',
$this->category->game_meta => ($game = Game::find($this->igdbId))->name.' ('.$game->first_release_date.')',
$this->category->movie_meta => ($movie = Movie::find($this->tmdbId))->title.' ('.$movie->release_date->format('Y').')',
$this->category->tv_meta => ($tv = Tv::find($this->tmdbId))->name.' ('.$tv->first_air_date->format('Y').')',
$this->category->game_meta => ($game = Game::find($this->igdbId))->name.' ('.$game->first_release_date->format('Y').')',
default => $torrents->pluck('name')->join(', '),
};

Expand Down
Loading