mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-01-25 05:19:36 -06:00
update: game support
This commit is contained in:
@@ -50,8 +50,8 @@ use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
use Intervention\Image\Facades\Image;
|
||||
use MarcReichel\IGDBLaravel\Models\Character;
|
||||
use MarcReichel\IGDBLaravel\Models\Game;
|
||||
use MarcReichel\IGDBLaravel\Models\PlatformLogo;
|
||||
|
||||
/**
|
||||
* @see \Tests\Todo\Feature\Http\Controllers\TorrentControllerTest
|
||||
@@ -159,7 +159,12 @@ class TorrentController extends Controller
|
||||
/**
|
||||
* Display The Torrent.
|
||||
*
|
||||
* @param \App\Models\Torrent $id
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param \App\Models\Torrent $id
|
||||
*
|
||||
* @throws \JsonException
|
||||
* @throws \MarcReichel\IGDBLaravel\Exceptions\MissingEndpointException
|
||||
* @throws \ReflectionException
|
||||
*/
|
||||
public function torrent(Request $request, $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
@@ -175,6 +180,7 @@ class TorrentController extends Controller
|
||||
|
||||
$meta = null;
|
||||
$trailer = null;
|
||||
$platforms = null;
|
||||
if ($torrent->category->tv_meta && $torrent->tmdb && $torrent->tmdb != 0) {
|
||||
$meta = Tv::with('genres', 'cast', 'companies', 'networks', 'recommendations')->where('id', '=', $torrent->tmdb)->first();
|
||||
$trailer = ( new \App\Services\Tmdb\Client\TV($torrent->tmdb))->get_trailer();
|
||||
@@ -185,10 +191,19 @@ class TorrentController extends Controller
|
||||
$trailer = ( new \App\Services\Tmdb\Client\Movie($torrent->tmdb))->get_trailer();
|
||||
}
|
||||
|
||||
$characters = null;
|
||||
if ($torrent->category->game_meta && ($torrent->igdb || $torrent->igdb != 0)) {
|
||||
$meta = Game::with(['cover' => ['url', 'image_id'], 'artworks' => ['url', 'image_id'], 'genres' => ['name']])->find($torrent->igdb);
|
||||
$characters = Character::whereIn('games', [$torrent->igdb])->take(6)->get();
|
||||
$meta = Game::with([
|
||||
'cover' => ['url', 'image_id'],
|
||||
'artworks' => ['url', 'image_id'],
|
||||
'genres' => ['name'],
|
||||
'videos' => ['video_id', 'name'],
|
||||
'involved_companies.company',
|
||||
'involved_companies.company.logo',
|
||||
'platforms'])
|
||||
->find($torrent->igdb);
|
||||
$link = collect($meta->videos)->take(1)->pluck('video_id');
|
||||
$trailer = 'https://www.youtube.com/embed/'.$link;
|
||||
$platforms = PlatformLogo::whereIn('id', collect($meta->platforms)->pluck('platform_logo')->toArray())->get();
|
||||
}
|
||||
|
||||
$featured = $torrent->featured == 1 ? FeaturedTorrent::where('torrent_id', '=', $id)->first() : null;
|
||||
@@ -208,7 +223,7 @@ class TorrentController extends Controller
|
||||
'freeleech_token' => $freeleechToken,
|
||||
'meta' => $meta,
|
||||
'trailer' => $trailer,
|
||||
'characters' => $characters,
|
||||
'platforms' => $platforms,
|
||||
'total_tips' => $totalTips,
|
||||
'user_tips' => $userTips,
|
||||
'featured' => $featured,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
"league/flysystem-cached-adapter": "~1.0",
|
||||
"league/flysystem-sftp": "~1.0",
|
||||
"livewire/livewire": "^2.0",
|
||||
"marcreichel/igdb-laravel": "^2.1.0",
|
||||
"marcreichel/igdb-laravel": "^3.1.2",
|
||||
"mews/purifier": "^3.2",
|
||||
"paragonie/constant_time_encoding": "^2.0",
|
||||
"predis/predis": "^1.1",
|
||||
|
||||
17
composer.lock
generated
17
composer.lock
generated
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "72ca7985df39d8775ca92d1d6be838da",
|
||||
"content-hash": "2cdb93faee4c22dfdd7ae1fca66d07e6",
|
||||
"packages": [
|
||||
{
|
||||
"name": "andkab/laravel-joypixels",
|
||||
@@ -3047,26 +3047,27 @@
|
||||
},
|
||||
{
|
||||
"name": "marcreichel/igdb-laravel",
|
||||
"version": "2.4.6",
|
||||
"version": "3.1.2",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/marcreichel/igdb-laravel.git",
|
||||
"reference": "aaaf7da764553f4318688266db0850c5164b25f2"
|
||||
"reference": "2d12908bf9f18d11e74094256fb3cd41f03d1517"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/marcreichel/igdb-laravel/zipball/aaaf7da764553f4318688266db0850c5164b25f2",
|
||||
"reference": "aaaf7da764553f4318688266db0850c5164b25f2",
|
||||
"url": "https://api.github.com/repos/marcreichel/igdb-laravel/zipball/2d12908bf9f18d11e74094256fb3cd41f03d1517",
|
||||
"reference": "2d12908bf9f18d11e74094256fb3cd41f03d1517",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
"ext-json": "*",
|
||||
"guzzlehttp/guzzle": "~6.0|~7.0",
|
||||
"laravel/framework": "^8.40.0",
|
||||
"php": "^7.3 | ^7.4 | ^8.0"
|
||||
"php": "^8.0"
|
||||
},
|
||||
"require-dev": {
|
||||
"nunomaduro/collision": "^5.3",
|
||||
"nunomaduro/larastan": "^0.7.13",
|
||||
"orchestra/testbench": "^6.0",
|
||||
"phpunit/phpunit": "^9.5.4",
|
||||
"roave/security-advisories": "dev-latest"
|
||||
@@ -3105,7 +3106,7 @@
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://github.com/marcreichel/igdb-laravel/issues",
|
||||
"source": "https://github.com/marcreichel/igdb-laravel/tree/2.4.6"
|
||||
"source": "https://github.com/marcreichel/igdb-laravel/tree/3.1.2"
|
||||
},
|
||||
"funding": [
|
||||
{
|
||||
@@ -3113,7 +3114,7 @@
|
||||
"type": "github"
|
||||
}
|
||||
],
|
||||
"time": "2021-06-27T09:36:13+00:00"
|
||||
"time": "2021-10-23T07:45:35+00:00"
|
||||
},
|
||||
{
|
||||
"name": "mews/purifier",
|
||||
|
||||
@@ -16,7 +16,7 @@ return [
|
||||
* These are the credentials you got from https://dev.twitch.tv/console/apps
|
||||
*/
|
||||
'credentials' => [
|
||||
'client_id' => env('TWITCH_CLIENT_ID', ''),
|
||||
'client_id' => env('TWITCH_CLIENT_ID', ''),
|
||||
'client_secret' => env('TWITCH_CLIENT_SECRET', ''),
|
||||
],
|
||||
|
||||
@@ -29,7 +29,15 @@ return [
|
||||
'cache_lifetime' => env('IGDB_CACHE_LIFETIME', 3600),
|
||||
|
||||
/*
|
||||
* This is the per-page limit for your tier.
|
||||
* Path where the webhooks should be handled.
|
||||
*/
|
||||
'per_page_limit' => 500,
|
||||
];
|
||||
'webhook_path' => 'igdb-webhook/handle',
|
||||
|
||||
/*
|
||||
* The webhook secret.
|
||||
*
|
||||
* This needs to be a string of your choice in order to use the webhook
|
||||
* functionality.
|
||||
*/
|
||||
'webhook_secret' => env('IGDB_WEBHOOK_SECRET'),
|
||||
];
|
||||
BIN
public/img/igdb.png
Normal file
BIN
public/img/igdb.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -41,403 +41,367 @@
|
||||
<table class="table table-condensed table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
@if ($user->show_poster == 1)
|
||||
<th>Poster</th>
|
||||
@else
|
||||
<th></th>
|
||||
@endif
|
||||
<th>@lang('torrent.category')</th>
|
||||
<th>@lang('torrent.type')/@lang('torrent.resolution')</th>
|
||||
<th>@lang('common.name')</th>
|
||||
<th><i class="{{ config('other.font-awesome') }} fa-clock"></i></th>
|
||||
<th><i class="{{ config('other.font-awesome') }} fa-file"></i></th>
|
||||
<th><i class="{{ config('other.font-awesome') }} fa-arrow-circle-up"></i></th>
|
||||
<th><i class="{{ config('other.font-awesome') }} fa-arrow-circle-down"></i></th>
|
||||
<th><i class="{{ config('other.font-awesome') }} fa-check-square"></i></th>
|
||||
<th class="torrent-listings-poster"></th>
|
||||
<th class="torrent-listings-format"></th>
|
||||
<th class="torrents-filename torrent-listings-overview">
|
||||
@lang('common.name')
|
||||
</th>
|
||||
<th class="torrent-listings-download">
|
||||
<div>
|
||||
<i class="{{ config('other.font-awesome') }} fa-download"></i>
|
||||
</div>
|
||||
</th>
|
||||
<th class="torrent-listings-tmdb">
|
||||
<div>
|
||||
<i class="{{ config('other.font-awesome') }} fa-id-badge"></i>
|
||||
</div>
|
||||
</th>
|
||||
<th class="torrent-listings-size">
|
||||
<i class="{{ config('other.font-awesome') }} fa-database"></i>
|
||||
</th>
|
||||
<th class="torrent-listings-seeders">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-alt-circle-up"></i>
|
||||
</th>
|
||||
<th class="torrent-listings-leechers">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-alt-circle-down"></i>
|
||||
</th>
|
||||
<th class="torrent-listings-completed">
|
||||
<i class="{{ config('other.font-awesome') }} fa-check-circle"></i>
|
||||
</th>
|
||||
<th class="torrent-listings-age">
|
||||
@lang('common.created_at')
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
@foreach ($torrents as $torrent)
|
||||
@php $meta = null; @endphp
|
||||
@if ($torrent->category->tv_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Tv::with('genres', 'networks', 'seasons')->where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@foreach($torrents as $torrent)
|
||||
@php $meta = null; @endphp
|
||||
@if ($torrent->category->tv_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Tv::where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@if ($torrent->category->movie_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Movie::with('genres', 'cast', 'companies', 'collection')->where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@endif
|
||||
@if ($torrent->category->movie_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Movie::where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@if ($torrent->category->game_meta)
|
||||
@if ($torrent->igdb || $torrent->igdb != 0)
|
||||
@php $meta = MarcReichel\IGDBLaravel\Models\Game::with(['cover' => ['url','image_id'], 'genres' => ['name']])->find($torrent->igdb); @endphp
|
||||
@endif
|
||||
@endif
|
||||
@if ($torrent->category->game_meta)
|
||||
@if ($torrent->igdb || $torrent->igdb != 0)
|
||||
@php $meta = MarcReichel\IGDBLaravel\Models\Game::with(['cover' => ['url', 'image_id']])->find($torrent->igdb); @endphp
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->sticky == 1)
|
||||
<tr class="success">
|
||||
@else
|
||||
<tr>
|
||||
@endif
|
||||
<td style="width: 1%;">
|
||||
@if ($user->show_poster == 1)
|
||||
<div class="torrent-poster pull-left">
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<img src="{{ isset($meta->poster) ? \tmdb_image('poster_small', $meta->poster) : 'https://via.placeholder.com/60x90' }}"
|
||||
class="torrent-poster-img-small show-poster" alt="@lang('torrent.poster')">
|
||||
@if ($torrent->sticky == 1)
|
||||
<tr class="success">
|
||||
@else
|
||||
<tr>
|
||||
@endif
|
||||
<td class="torrent-listings-poster" style="width: 1%;">
|
||||
@if ($user->show_poster == 1)
|
||||
<div class="torrent-poster pull-left">
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<img src="{{ isset($meta->poster) ? \tmdb_image('poster_small', $meta->poster) : 'https://via.placeholder.com/90x135' }}"
|
||||
class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->game_meta)
|
||||
<img style="height: 80px;" src="{{ isset($meta->cover) ? 'https://images.igdb.com/igdb/image/upload/t_cover_small_2x/'.$meta->cover['image_id'].'.png' : 'https://via.placeholder.com/90x135' }}"
|
||||
class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->music_meta)
|
||||
<img src="https://via.placeholder.com/90x135" class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->no_meta)
|
||||
@if(file_exists(public_path().'/files/img/torrent-cover_'.$torrent->id.'.jpg'))
|
||||
<img src="{{ url('files/img/torrent-cover_' . $torrent->id . '.jpg') }}" class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/400x600" class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->game_meta && isset($meta) && $meta->cover->image_id && $meta->name)
|
||||
<img src="https://images.igdb.com/igdb/image/upload/t_cover_small/{{ $meta->cover->image_id }}.jpg"
|
||||
class="torrent-poster-img-small show-poster" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->music_meta)
|
||||
<img src="https://via.placeholder.com/60x90" class="torrent-poster-img-small show-poster"
|
||||
alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->no_meta)
|
||||
@if(file_exists(public_path().'/files/img/torrent-cover_'.$torrent->id.'.jpg'))
|
||||
<img src="{{ url('files/img/torrent-cover_' . $torrent->id . '.jpg') }}" class="torrent-poster-img-small show-poster" alt="@lang('torrent.poster')">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/60x90" class="torrent-poster-img-small show-poster" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
@endif
|
||||
</div>
|
||||
@else
|
||||
<div class="torrent-poster pull-left"></div>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td style="width: 1%;">
|
||||
@if ($torrent->category->image != null)
|
||||
<a href="{{ route('categories.show', ['id' => $torrent->category->id]) }}">
|
||||
<div class="text-center">
|
||||
<img src="{{ url('files/img/' . $torrent->category->image) }}" data-toggle="tooltip"
|
||||
data-original-title="{{ $torrent->category->name }} {{ strtolower(trans('torrent.torrent')) }}"
|
||||
style="padding-top: 10px;" alt="{{ $torrent->category->name }}">
|
||||
</div>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('categories.show', ['id' => $torrent->category->id]) }}">
|
||||
<div class="text-center">
|
||||
<i class="{{ $torrent->category->icon }} torrent-icon" data-toggle="tooltip"
|
||||
data-original-title="{{ $torrent->category->name }} {{ strtolower(trans('torrent.torrent')) }}"
|
||||
style="padding-top: 10px;"></i>
|
||||
</div>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td style="width: 1%;">
|
||||
<div class="text-center" style="padding-top: 15px;">
|
||||
<span class="label label-success" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.type')">
|
||||
{{ $torrent->type->name }}
|
||||
</span>
|
||||
@endif
|
||||
</div>
|
||||
<div class="text-center" style="padding-top: 8px;">
|
||||
<span class="label label-success" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.resolution')">
|
||||
{{ $torrent->resolution->name ?? 'No Res' }}
|
||||
</span>
|
||||
@else
|
||||
<div class="torrent-poster pull-left"></div>
|
||||
@endif
|
||||
<td class="torrent-listings-format" style="width: 5%; text-align: center;">
|
||||
<a href="{{ route('categories.show', ['id' => $torrent->category->id]) }}">
|
||||
<div class="text-center">
|
||||
<i class="{{ $torrent->category->icon }} torrent-icon" style="@if ($torrent->category->movie_meta || $torrent->category->tv_meta) padding-top: 1px; @else padding-top: 15px; @endif font-size: 24px;"></i>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<a class="view-torrent" href="{{ route('torrent', ['id' => $torrent->id]) }}">
|
||||
{{ $torrent->name }}
|
||||
</a>
|
||||
|
||||
@if ($current = $user->history->where('info_hash', $torrent->info_hash)->first())
|
||||
@if ($current->seeder == 1 && $current->active == 1)
|
||||
<button class="btn btn-success btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.currently-seeding')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-up"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 0 && $current->active == 1)
|
||||
<button class="btn btn-warning btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.currently-leeching')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-down"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 0 && $current->active == 0 && $current->completed_at == null)
|
||||
<button class="btn btn-info btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.not-completed')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-spinner"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 1 && $current->active == 0 && $current->completed_at != null)
|
||||
<button class="btn btn-danger btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.completed-not-seeding')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
<br>
|
||||
@if ($torrent->anon == 1)
|
||||
<span class="badge-extra text-bold">
|
||||
<i class="{{ config('other.font-awesome') }} fa-upload" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.uploader')"></i> @lang('common.anonymous')
|
||||
@if ($user->id == $torrent->user->id || $user->group->is_modo)
|
||||
<a href="{{ route('users.show', ['username' => $torrent->user->username]) }}">
|
||||
({{ $torrent->user->username }})
|
||||
</a>
|
||||
@endif
|
||||
</span>
|
||||
@else
|
||||
<span class="badge-extra text-bold">
|
||||
<i class="{{ config('other.font-awesome') }} fa-upload" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.uploader')"></i>
|
||||
<a href="{{ route('users.show', ['username' => $torrent->user->username]) }}">
|
||||
{{ $torrent->user->username }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<span class="badge-extra text-bold">
|
||||
<span class="text-gold movie-rating-stars">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-up" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.rating')"></i>
|
||||
<div class="text-center">
|
||||
<span class="label label-success" style="font-size: 13px">
|
||||
{{ $torrent->type->name }}
|
||||
</span>
|
||||
{{ $meta->vote_average ?? 0 }}/10 ({{ $meta->vote_count ?? 0 }} @lang('torrent.votes'))
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->game_meta && isset($meta))
|
||||
<span class="badge-extra text-bold">@lang('torrent.rating'):
|
||||
<span class="text-gold movie-rating-stars">
|
||||
<i class="{{ config('other.font-awesome') }} fa-star"></i>
|
||||
</span>
|
||||
{{ $meta->rating ? \round($meta->rating) : '0' }}/100 ({{ $meta->rating_count }} @lang('torrent.votes'))
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<span class="badge-extra text-bold text-pink">
|
||||
<i class="{{ config('other.font-awesome') }} fa-heart" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.thanks-given')"></i>
|
||||
{{ $torrent->thanks_count }}
|
||||
</span>
|
||||
|
||||
<a href="{{ route('torrent', ['id' => $torrent->id, 'hash' => '#comments']) }}">
|
||||
<span class="badge-extra text-bold text-green">
|
||||
<i class="{{ config('other.font-awesome') }} fa-comment" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.comments')"></i>
|
||||
{{ $torrent->comments_count }}
|
||||
</div>
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<div class="text-center" style="padding-top: 5px;">
|
||||
<span class="label label-success" style="font-size: 13px">
|
||||
{{ $torrent->resolution->name ?? 'N/A' }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td class="torrent-listings-overview" style="vertical-align: middle;">
|
||||
<a class="view-torrent torrent-listings-name" style="font-size: 16px;" href="{{ route('torrent', ['id' => $torrent->id]) }}">
|
||||
{{ $torrent->name }}
|
||||
</a>
|
||||
@if ($current = $user->history->where('info_hash', $torrent->info_hash)->first())
|
||||
@if ($current->seeder == 1 && $current->active == 1)
|
||||
<button class="btn btn-success btn-circle torrent-listings-seeding" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.currently-seeding')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-up"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 0 && $current->active == 1)
|
||||
<button class="btn btn-warning btn-circle torrent-listings-leeching" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.currently-leeching')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-arrow-down"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 0 && $current->active == 0 && $current->completed_at == null)
|
||||
<button class="btn btn-info btn-circle torrent-listings-incomplete" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.not-completed')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-spinner"></i>
|
||||
</button>
|
||||
@endif
|
||||
|
||||
@if ($current->seeder == 1 && $current->active == 0 && $current->completed_at != null)
|
||||
<button class="btn btn-danger btn-circle torrent-listings-complete" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('torrent.completed-not-seeding')!">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-down"></i>
|
||||
</button>
|
||||
@endif
|
||||
@endif
|
||||
<br>
|
||||
@if ($torrent->anon === 0)
|
||||
<span class="badge-extra torrent-listings-uploader">
|
||||
<i class="{{ config('other.font-awesome') }} {{ $torrent->user->group->icon }}"></i>
|
||||
<a href="{{ route('users.show', ['username' => $torrent->user->username]) }}">
|
||||
{{ $torrent->user->username }}
|
||||
</a>
|
||||
</span>
|
||||
@else
|
||||
<span class="badge-extra torrent-listings-uploader">
|
||||
<i class="{{ config('other.font-awesome') }} fa-ghost"></i>
|
||||
{{ strtoupper(trans('common.anonymous')) }}
|
||||
@if ($user->group->is_modo || $torrent->user->username === $user->username)
|
||||
<a href="{{ route('users.show', ['username' => $torrent->user->username]) }}">
|
||||
({{ $torrent->user->username }})
|
||||
</a>
|
||||
|
||||
@if ($torrent->internal == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
<span class='badge-extra text-pink torrent-listings-thanks'>
|
||||
<i class="{{ config('other.font-awesome') }} fa-heartbeat"></i> {{ $torrent->thanks_count }}
|
||||
</span>
|
||||
<span class='badge-extra text-green torrent-listings-comments'>
|
||||
<i class="{{ config('other.font-awesome') }} fa-comment-alt-lines"></i> {{ $torrent->comments_count }}
|
||||
</span>
|
||||
@if ($torrent->internal == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-internal'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-magic' data-toggle='tooltip' title=''
|
||||
data-original-title='@lang('torrent.internal-release')' style="color: #baaf92;"></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->stream == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($torrent->personal_release == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-personal'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-user-plus' data-toggle='tooltip' title=''
|
||||
data-original-title='Personal Release' style="color: #865be9;"></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->stream == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-stream-optimized'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-play text-red' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.stream-optimized')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->featured == 0)
|
||||
@if ($torrent->doubleup == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($torrent->featured == 0)
|
||||
@if ($torrent->doubleup == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-double-upload'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-gem text-green' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.double-upload')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrent->free == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@endif
|
||||
@if ($torrent->free == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-freeleech'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-star text-gold' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.freeleech')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($personal_freeleech)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($personal_freeleech)
|
||||
<span class='badge-extra text-bold torrent-listings-personal-freeleech'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-id-badge text-orange' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.personal-freeleech')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($user->freeleechTokens->where('torrent_id', $torrent->id)->first())
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($user->freeleechTokens->where('torrent_id', $torrent->id)->first())
|
||||
<span class='badge-extra text-bold torrent-listings-freeleech-token'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-star text-bold' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.freeleech-token')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->featured == 1)
|
||||
<span class='badge-extra text-bold' style='background-image:url(/img/sparkels.gif);'>
|
||||
@if ($torrent->featured == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-featured' style='background-image:url(/img/sparkels.gif);'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-certificate text-pink' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.featured')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($user->group->is_freeleech == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($user->group->is_freeleech == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-special-freeleech'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-trophy text-purple' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.special-freeleech')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (config('other.freeleech') == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if (config('other.freeleech') == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-global-freeleech'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-globe text-blue' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.global-freeleech')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if (config('other.doubleup') == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if (config('other.doubleup') == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-global-double-upload'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-globe text-green' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.global-double-upload')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($user->group->is_double_upload == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-trophy text-purple'
|
||||
data-toggle='tooltip' title='' data-original-title='@lang('
|
||||
torrent.special-double_upload')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@if ($user->group->is_double_upload == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-special-double-upload'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-trophy text-purple'
|
||||
data-toggle='tooltip' title='' data-original-title='@lang('torrent.special-double_upload')'></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->leechers >= 5)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($torrent->leechers >= 5)
|
||||
<span class='badge-extra text-bold torrent-listings-hot'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-fire text-orange' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('common.hot')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->sticky == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
@if ($torrent->sticky == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-sticky'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-thumbtack text-black' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.sticky')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($user->updated_at->getTimestamp() < $torrent->created_at->getTimestamp())
|
||||
<span class='badge-extra text-bold'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-magic text-black' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('common.new')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrent->highspeed == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-high-speed'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-tachometer text-red' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('common.high-speeds')'></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->highspeed == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-tachometer text-red' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('common.high-speeds')'></i>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrent->sd == 1)
|
||||
<span class='badge-extra text-bold torrent-listings-sd'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-ticket text-orange' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.sd-content')'></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrent->sd == 1)
|
||||
<span class='badge-extra text-bold'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-ticket text-orange' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.sd-content')'></i>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
|
||||
@if ($torrent->category->game_meta)
|
||||
@if (isset($meta) && $meta->genres)
|
||||
@foreach ($meta->genres as $genre)
|
||||
<span class="badge-extra text-bold">
|
||||
<i class='{{ config('other.font-awesome') }} fa-tag' data-toggle='tooltip' title=''
|
||||
data-original-title='@lang('torrent.genre')'></i> {{ $genre->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
@if (isset($meta) && $meta->genres)
|
||||
@foreach($meta->genres as $genre)
|
||||
<span class="badge-extra text-bold">
|
||||
<i class='{{ config('other.font-awesome') }} fa-tag' data-toggle='tooltip' title=''
|
||||
data-original-title='@lang('torrent.genre')'></i> {{ $genre->name }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
@if (file_exists(public_path().'/files/torrents/'.$torrent->file_name))
|
||||
@if (config('torrent.download_check_page') == 1)
|
||||
<a href="{{ route('download_check', ['id' => $torrent->id]) }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.download')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
@else
|
||||
<a href="{{ route('download', ['id' => $torrent->id]) }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.download')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
@endif
|
||||
@else
|
||||
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.magnet')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-magnet"></i>
|
||||
</button>
|
||||
</a>
|
||||
@endif
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span data-toggle="tooltip" data-original-title="Bookmark" id="torrentBookmark{{ $torrent->id }}"
|
||||
torrent="{{ $torrent->id }}"
|
||||
state="{{ $bookmarks->where('torrent_id', $torrent->id)->first() ? 1 : 0 }}"
|
||||
class="torrentBookmark"></span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<time>{{ $torrent->created_at->diffForHumans() }}</time>
|
||||
</td>
|
||||
<td>
|
||||
<span class='badge-extra text-blue text-bold'>{{ $torrent->getSize() }}</span>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('peers', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-green text-bold'>
|
||||
{{ $torrent->seeders }}
|
||||
</span>
|
||||
@if ($torrent->bumped_at != $torrent->created_at && $torrent->bumped_at < Carbon\Carbon::now()->addDay(2))
|
||||
<span class='badge-extra text-bold torrent-listings-bumped'>
|
||||
<i class='{{ config('other.font-awesome') }} fa-level-up-alt text-gold' data-toggle='tooltip'
|
||||
title='' data-original-title='@lang('torrent.recent-bumped')'></i>
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="torrent-listings-download" style="vertical-align: middle;">
|
||||
@if (config('torrent.download_check_page') == 1)
|
||||
<a href="{{ route('download_check', ['id' => $torrent->id]) }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.download')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('peers', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-red text-bold'>
|
||||
{{ $torrent->leechers }}
|
||||
</span>
|
||||
@else
|
||||
<a href="{{ route('download', ['id' => $torrent->id]) }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.download')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-download"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a href="{{ route('history', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-orange text-bold'>
|
||||
{{ $torrent->times_completed }} @lang('common.times')
|
||||
</span>
|
||||
@endif
|
||||
@if (config('torrent.magnet') == 1)
|
||||
<a href="magnet:?dn={{ $torrent->name }}&xt=urn:btih:{{ $torrent->info_hash }}&as={{ route('torrent.download.rsskey', ['id' => $torrent->id, 'rsskey' => $user->rsskey ]) }}&tr={{ route('announce', ['passkey' => $user->passkey]) }}&xl={{ $torrent->size }}">
|
||||
<button class="btn btn-primary btn-circle" type="button" data-toggle="tooltip"
|
||||
data-original-title="@lang('common.magnet')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-magnet"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
@endif
|
||||
<div>
|
||||
@livewire('small-bookmark-button', ['torrent' => $torrent->id], key($torrent->id))
|
||||
</div>
|
||||
</td>
|
||||
<td class="torrent-listings-tmdb" style="vertical-align: middle;">
|
||||
@if ($torrent->category->game_meta)
|
||||
<span class='badge-extra'>
|
||||
<img src="{{ url('img/igdb.png') }}" alt="igdb_id" style="margin-left: -5px;" width="24px" height="24px"> {{ $torrent->igdb }}
|
||||
<br>
|
||||
<span class="{{ \rating_color(round($meta->rating) ?? 'text-white') }}"><i class="{{ config('other.font-awesome') }} fa-star-half-alt"></i> {{ $meta->rating_count ?? 0 }}/100 </span>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<span class='badge-extra'>
|
||||
<a href="{{ route('torrents.similar', ['category_id' => $torrent->category_id, 'tmdb' => $torrent->tmdb]) }}">
|
||||
<img src="{{ url('img/tmdb_small.png') }}" alt="igdb_id" style="margin-left: -5px;" width="24px" height="24px"> {{ $torrent->tmdb }}
|
||||
</a>
|
||||
<br>
|
||||
<span class="{{ \rating_color($meta->vote_average ?? 'text-white') }}"><i class="{{ config('other.font-awesome') }} fa-star-half-alt"></i> {{ $meta->vote_average ?? 0 }}/10 </span>
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="torrent-listings-size" style="vertical-align: middle;">
|
||||
<span class='badge-extra'>
|
||||
{{ $torrent->getSize() }}
|
||||
</span>
|
||||
</td>
|
||||
<td class="torrent-listings-seeders" style="vertical-align: middle;">
|
||||
<a href="{{ route('peers', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-green'>
|
||||
{{ $torrent->seeders }}
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="torrent-listings-leechers" style="vertical-align: middle;">
|
||||
<a href="{{ route('peers', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-red'>
|
||||
{{ $torrent->leechers }}
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="torrent-listings-completed" style="vertical-align: middle;">
|
||||
<a href="{{ route('history', ['id' => $torrent->id]) }}">
|
||||
<span class='badge-extra text-orange'>
|
||||
{{ $torrent->times_completed }}
|
||||
</span>
|
||||
</a>
|
||||
</td>
|
||||
<td class="torrent-listings-age" style="vertical-align: middle;">
|
||||
<span class='badge-extra'>
|
||||
{{ $torrent->created_at->diffForHumans() }}
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="text-center">
|
||||
|
||||
@@ -391,12 +391,17 @@
|
||||
@php $meta = null; @endphp
|
||||
@if ($torrent->category->tv_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Tv::with('genres')->where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@php $meta = App\Models\Tv::where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@endif
|
||||
@if ($torrent->category->movie_meta)
|
||||
@if ($torrent->tmdb || $torrent->tmdb != 0)
|
||||
@php $meta = App\Models\Movie::with('genres')->where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@php $meta = App\Models\Movie::where('id', '=', $torrent->tmdb)->first(); @endphp
|
||||
@endif
|
||||
@endif
|
||||
@if ($torrent->category->game_meta)
|
||||
@if ($torrent->igdb || $torrent->igdb != 0)
|
||||
@php $meta = MarcReichel\IGDBLaravel\Models\Game::with(['cover' => ['url', 'image_id']])->find($torrent->igdb); @endphp
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -413,14 +418,13 @@
|
||||
class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->game_meta && isset($meta) && $meta->cover->image_id && $meta->name)
|
||||
<img src="https://images.igdb.com/igdb/image/upload/t_cover_small/{{ $meta->cover->image_id }}.jpg"
|
||||
@if ($torrent->category->game_meta)
|
||||
<img style="height: 80px;" src="{{ isset($meta->cover) ? 'https://images.igdb.com/igdb/image/upload/t_cover_small_2x/'.$meta->cover['image_id'].'.png' : 'https://via.placeholder.com/90x135' }}"
|
||||
class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->music_meta)
|
||||
<img src="https://via.placeholder.com/90x135"
|
||||
class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
<img src="https://via.placeholder.com/90x135" class="torrent-poster-img-small" alt="@lang('torrent.poster')">
|
||||
@endif
|
||||
|
||||
@if ($torrent->category->no_meta)
|
||||
@@ -434,11 +438,10 @@
|
||||
@else
|
||||
<div class="torrent-poster pull-left"></div>
|
||||
@endif
|
||||
</td style="width: 1%;">
|
||||
<td class="torrent-listings-format" style="width: 5%; text-align: center;">
|
||||
<a href="{{ route('categories.show', ['id' => $torrent->category->id]) }}">
|
||||
<div class="text-center">
|
||||
<i class="{{ $torrent->category->icon }} torrent-icon" style="padding-top: 1px; font-size: 24px;"></i>
|
||||
<i class="{{ $torrent->category->icon }} torrent-icon" style="@if ($torrent->category->movie_meta || $torrent->category->tv_meta) padding-top: 1px; @else padding-top: 15px; @endif font-size: 24px;"></i>
|
||||
</div>
|
||||
</a>
|
||||
<div class="text-center">
|
||||
@@ -446,11 +449,13 @@
|
||||
{{ $torrent->type->name }}
|
||||
</span>
|
||||
</div>
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<div class="text-center" style="padding-top: 5px;">
|
||||
<span class="label label-success" style="font-size: 13px">
|
||||
{{ $torrent->resolution->name ?? 'N/A' }}
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</td>
|
||||
<td class="torrent-listings-overview" style="vertical-align: middle;">
|
||||
<a class="view-torrent torrent-listings-name" style="font-size: 16px;" href="{{ route('torrent', ['id' => $torrent->id]) }}">
|
||||
@@ -659,13 +664,22 @@
|
||||
</div>
|
||||
</td>
|
||||
<td class="torrent-listings-tmdb" style="vertical-align: middle;">
|
||||
<span class='badge-extra'>
|
||||
<a href="{{ route('torrents.similar', ['category_id' => $torrent->category_id, 'tmdb' => $torrent->tmdb]) }}">
|
||||
<img src="{{ url('img/tmdb_small.png') }}" alt="tmdb_id" style="margin-left: -5px;" width="24px" height="24px"> {{ $torrent->tmdb }}
|
||||
</a>
|
||||
<br>
|
||||
<span class="{{ \rating_color($meta->vote_average ?? 'text-white') }}"><i class="{{ config('other.font-awesome') }} fa-star-half-alt"></i> {{ $meta->vote_average ?? 0 }}/10 </span>
|
||||
</span>
|
||||
@if ($torrent->category->game_meta)
|
||||
<span class='badge-extra'>
|
||||
<img src="{{ url('img/igdb.png') }}" alt="igdb_id" style="margin-left: -5px;" width="24px" height="24px"> {{ $torrent->igdb }}
|
||||
<br>
|
||||
<span class="{{ \rating_color(round($meta->rating) ?? 'text-white') }}"><i class="{{ config('other.font-awesome') }} fa-star-half-alt"></i> {{ $meta->rating_count ?? 0 }}/100 </span>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrent->category->movie_meta || $torrent->category->tv_meta)
|
||||
<span class='badge-extra'>
|
||||
<a href="{{ route('torrents.similar', ['category_id' => $torrent->category_id, 'tmdb' => $torrent->tmdb]) }}">
|
||||
<img src="{{ url('img/tmdb_small.png') }}" alt="igdb_id" style="margin-left: -5px;" width="24px" height="24px"> {{ $torrent->tmdb }}
|
||||
</a>
|
||||
<br>
|
||||
<span class="{{ \rating_color($meta->vote_average ?? 'text-white') }}"><i class="{{ config('other.font-awesome') }} fa-star-half-alt"></i> {{ $meta->vote_average ?? 0 }}/10 </span>
|
||||
</span>
|
||||
@endif
|
||||
</td>
|
||||
<td class="torrent-listings-size" style="vertical-align: middle;">
|
||||
<span class='badge-extra'>
|
||||
@@ -735,4 +749,3 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -1,71 +1,94 @@
|
||||
<div class="movie-wrapper game">
|
||||
<div class="movie-wrapper">
|
||||
<div class="movie-overlay"></div>
|
||||
<div class="movie-poster">
|
||||
@php $igdb_poster = (isset($meta) && $meta->cover) ? 'https://images.igdb.com/igdb/image/upload/t_original/'.$meta->cover['image_id'].'.jpg' : 'https://via.placeholder.com/400x600'; @endphp
|
||||
<img src="{{ $igdb_poster }}" class="img-responsive" id="meta-poster">
|
||||
<img style="height: 516px !important;" src="{{ (isset($meta) && $meta->cover) ? 'https://images.igdb.com/igdb/image/upload/t_original/'.$meta->cover['image_id'].'.jpg' : 'https://via.placeholder.com/400x600' }}" class="img-responsive" id="meta-poster">
|
||||
</div>
|
||||
|
||||
<div class="meta-info">
|
||||
<div class="tags">
|
||||
{{ $torrent->category->name }}
|
||||
</div>
|
||||
|
||||
@php $igdb_backdrop = (isset($meta) && $meta->artworks) ? 'https://images.igdb.com/igdb/image/upload/t_screenshot_big/'.$meta->artworks[0]['image_id'].'.jpg' : 'https://via.placeholder.com/960x540'; @endphp
|
||||
<div class="movie-backdrop" style="background-image: url('{{ $igdb_backdrop }}');"></div>
|
||||
<div class="movie-right">
|
||||
@if(isset($meta->involved_companies))
|
||||
<div class="badge-user">
|
||||
<a href="{{ $meta->involved_companies[0]['company']['url'] }}" target="_blank">
|
||||
<img class="img-responsive" src="{{ $meta->involved_companies[0]['company']['logo']['image_id'] ? 'https://images.igdb.com/igdb/image/upload/t_logo_med/'.$meta->involved_companies[0]['company']['logo']['image_id'].'.png' : 'https://via.placeholder.com/138x175' }}">
|
||||
</a>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="movie-backdrop" style="background-image: url('{{ (isset($meta) && $meta->artworks) ? 'https://images.igdb.com/igdb/image/upload/t_screenshot_big/'.$meta->artworks[0]['image_id'].'.jpg' : 'https://via.placeholder.com/960x540' }}');"></div>
|
||||
|
||||
<div class="movie-top">
|
||||
<h1 class="movie-heading">
|
||||
@if (isset($meta) && $meta->name)
|
||||
<span class="text-bold">{{ $meta->name }}</span>
|
||||
<span> ({{ date('Y', strtotime($meta->first_release_date)) }})</span>
|
||||
@else
|
||||
<span class="text-bold">@lang('torrent.no-meta')</span>
|
||||
<h1 class="movie-heading" style="margin-bottom: 0;">
|
||||
<span class="text-bright text-bold" style="font-size: 28px;">{{ $meta->name ?? 'No Meta Found' }}</span>
|
||||
@if(isset($meta->first_release_date))
|
||||
<span style="font-size: 28px;"> ({{ substr($meta->first_release_date, 0, 4) ?? '' }})</span>
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
<div class="movie-overview">
|
||||
@if (isset($meta) && $meta->summary)
|
||||
{{ Str::limit($meta->summary, $limit = 450, $end = '...') }}
|
||||
@endif
|
||||
{{ isset($meta->summary) ? Str::limit($meta->summary, $limit = 600, $end = '...') : '' }}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="movie-bottom">
|
||||
<div class="movie-details">
|
||||
@if (isset($meta) && $meta->url && $torrent->igdb != 0 && $torrent->igdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="{{ $meta->url }}" title="IMDB" target="_blank">
|
||||
@if (isset($meta) && $meta->url && $torrent->igdb !== 0 && $torrent->igdb !== null)
|
||||
<span class="badge-user text-bold">
|
||||
<a href="{{ $meta->url }}" title="IGDB" target="_blank">
|
||||
<i class="{{ config('other.font-awesome') }} fa-gamepad"></i> IGDB: {{ $torrent->igdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if (isset($meta) && $meta->genres)
|
||||
@if (isset($trailer))
|
||||
<span style="cursor: pointer;" class="badge-user text-bold show-trailer">
|
||||
<a class="text-pink" title="@lang('torrent.trailer')">@lang('torrent.trailer')
|
||||
<i class="{{ config('other.font-awesome') }} fa-external-link"></i>
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<br>
|
||||
@if (isset($meta->genres))
|
||||
@foreach ($meta->genres as $genre)
|
||||
<span class="badge-user text-bold text-green">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag"></i> {{ $genre['name'] }}
|
||||
<i class="{{ config('other.font-awesome') }} fa-theater-masks"></i> {{ $genre['name'] }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
<br>
|
||||
@if ($torrent->keywords)
|
||||
@foreach ($torrent->keywords as $keyword)
|
||||
<span class="badge-user text-bold text-green">
|
||||
<a href="{{ route('torrents') }}?keywords={{ $keyword->name }}">
|
||||
<i class="{{ config('other.font-awesome') }} fa-tag"></i> {{ $keyword->name }}
|
||||
</a>
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="movie-details">
|
||||
@if (isset($meta) && $meta->rating && $meta->rating_count)
|
||||
<span class="badge-user text-bold text-gold">@lang('torrent.rating'):
|
||||
<span class="movie-rating-stars">
|
||||
<i class="{{ config('other.font-awesome') }} fa-star"></i>
|
||||
</span>
|
||||
{{ \round($meta->rating) }}/100 ({{ $meta->rating_count }} @lang('torrent.votes'))
|
||||
<span class="badge-user text-bold text-gold">@lang('torrent.rating'):
|
||||
<span class="movie-rating-stars">
|
||||
<i class="{{ config('other.font-awesome') }} fa-star"></i>
|
||||
</span>
|
||||
@endif
|
||||
{{ round($meta->rating) ?? 0 }}/100 ({{ $meta->rating_count ?? 0 }} @lang('torrent.votes'))
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<span class="badge-user text-bold">
|
||||
<i class="fab fa-xbox"></i> Platforms:
|
||||
</span>
|
||||
<div class="cast-list">
|
||||
@if (isset($characters))
|
||||
@foreach($characters as $character)
|
||||
<div class="cast-item">
|
||||
<a href="{{ route('mediahub.persons.show', ['id' => $character->id]) }}" class="badge-user">
|
||||
<img class="img-responsive" src="{{ $character->img_url }}" alt="{{ $character->name }}">
|
||||
<div class="cast-name">{{ $character->name }}</div>
|
||||
@if (isset($platforms))
|
||||
@foreach ($platforms as $platform)
|
||||
<div class="cast-item" style="max-width: 80px;">
|
||||
<img class="img-responsive" src="{{ $platform->image_id ? 'https://images.igdb.com/igdb/image/upload/t_logo_med/'.$platform->image_id.'.png' : 'https://via.placeholder.com/138x175' }}">
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user