mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-04-21 17:28:31 -05:00
(Fix) Game Meta Support 🐛
- add game support to requests - fixes some bugs
This commit is contained in:
@@ -28,6 +28,7 @@ use App\Notifications\NewRequestFill;
|
||||
use App\Notifications\NewRequestClaim;
|
||||
use App\Notifications\NewRequestBounty;
|
||||
use App\Notifications\NewRequestUnclaim;
|
||||
use MarcReichel\IGDBLaravel\Models\Game;
|
||||
use App\Achievements\UserFilled25Requests;
|
||||
use App\Achievements\UserFilled50Requests;
|
||||
use App\Achievements\UserFilled75Requests;
|
||||
@@ -109,6 +110,7 @@ class RequestController extends Controller
|
||||
$tvdb = $request->input('tvdb');
|
||||
$tmdb = $request->input('tmdb');
|
||||
$mal = $request->input('mal');
|
||||
$igdb = $request->input('igdb');
|
||||
$categories = $request->input('categories');
|
||||
$types = $request->input('types');
|
||||
$myrequests = $request->input('myrequests');
|
||||
@@ -141,6 +143,10 @@ class RequestController extends Controller
|
||||
$torrentRequest->where('mal', '=', $mal);
|
||||
}
|
||||
|
||||
if ($request->has('igdb') && $request->input('igdb') != null) {
|
||||
$torrentRequest->where('igdb', '=', $igdb);
|
||||
}
|
||||
|
||||
if ($request->has('categories') && $request->input('categories') != null) {
|
||||
$torrentRequest->whereIn('category_id', $categories);
|
||||
}
|
||||
@@ -206,20 +212,26 @@ class RequestController extends Controller
|
||||
$voters = $torrentRequest->requestBounty()->get();
|
||||
$comments = $torrentRequest->comments()->latest('created_at')->paginate(6);
|
||||
$carbon = Carbon::now()->addDay();
|
||||
|
||||
$client = new \App\Services\MovieScrapper(config('api-keys.tmdb'), config('api-keys.tvdb'), config('api-keys.omdb'));
|
||||
$meta = null;
|
||||
if ($torrentRequest->category->tv_meta) {
|
||||
if ($torrentRequest->tmdb || $torrentRequest->tmdb != 0) {
|
||||
$meta = $client->scrape('tv', null, $torrentRequest->tmdb);
|
||||
} else {
|
||||
$meta = $client->scrape('tv', 'tt'.$torrentRequest->imdb);
|
||||
}
|
||||
} elseif ($torrentRequest->category->movie_meta) {
|
||||
}
|
||||
if ($torrentRequest->category->movie_meta) {
|
||||
if ($torrentRequest->tmdb || $torrentRequest->tmdb != 0) {
|
||||
$meta = $client->scrape('movie', null, $torrentRequest->tmdb);
|
||||
} else {
|
||||
$meta = $client->scrape('movie', 'tt'.$torrentRequest->imdb);
|
||||
}
|
||||
}
|
||||
if ($torrentRequest->category->game_meta) {
|
||||
$meta = Game::with(['cover' => ['url', 'image_id'], 'artworks' => ['url', 'image_id'], 'genres' => ['name']])->find($torrentRequest->igdb);
|
||||
}
|
||||
|
||||
return view('requests.request', [
|
||||
'torrentRequest' => $torrentRequest,
|
||||
@@ -274,6 +286,7 @@ class RequestController extends Controller
|
||||
$tr->tvdb = $request->input('tvdb');
|
||||
$tr->tmdb = $request->input('tmdb');
|
||||
$tr->mal = $request->input('mal');
|
||||
$tr->igdb = $request->input('igdb');
|
||||
$tr->type = $request->input('type');
|
||||
$tr->bounty = $request->input('bounty');
|
||||
$tr->votes = 1;
|
||||
@@ -285,6 +298,7 @@ class RequestController extends Controller
|
||||
'tvdb' => 'required|numeric',
|
||||
'tmdb' => 'required|numeric',
|
||||
'mal' => 'required|numeric',
|
||||
'igdb' => 'required|numeric',
|
||||
'category_id' => 'required|exists:categories,id',
|
||||
'type' => 'required',
|
||||
'description' => 'required|string',
|
||||
@@ -378,6 +392,7 @@ class RequestController extends Controller
|
||||
$tvdb = $request->input('tvdb');
|
||||
$tmdb = $request->input('tmdb');
|
||||
$mal = $request->input('mal');
|
||||
$igdb = $request->input('igdb');
|
||||
$category = $request->input('category_id');
|
||||
$type = $request->input('type');
|
||||
$description = $request->input('description');
|
||||
@@ -399,6 +414,7 @@ class RequestController extends Controller
|
||||
'tvdb' => 'required|numeric',
|
||||
'tmdb' => 'required|numeric',
|
||||
'mal' => 'required|numeric',
|
||||
'igdb' => 'required|numeric',
|
||||
'category_id' => 'required|exists:categories,id',
|
||||
'type' => 'required',
|
||||
'description' => 'required|string',
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
|
||||
class AlterRequestsTable extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::table('requests', function (Blueprint $table) {
|
||||
$table->string('igdb')->default(0)->index()->after('mal');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::table('torrents', function (Blueprint $table) {
|
||||
//
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -37,6 +37,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@php $meta = null; @endphp
|
||||
@foreach ($featured as $key => $feature)
|
||||
@if ($feature->torrent->category->tv_meta)
|
||||
@if ($feature->torrent->tmdb || $feature->torrent->tmdb != 0)
|
||||
@@ -44,34 +45,53 @@
|
||||
@else
|
||||
@php $meta = $client->scrape('tv', 'tt'. $feature->torrent->imdb); @endphp
|
||||
@endif
|
||||
@elseif ($feature->torrent->category->movie_meta)
|
||||
@endif
|
||||
@if ($feature->torrent->category->movie_meta)
|
||||
@if ($feature->torrent->tmdb || $feature->torrent->tmdb != 0)
|
||||
@php $meta = $client->scrape('movie', null, $feature->torrent->tmdb); @endphp
|
||||
@else
|
||||
@php $meta = $client->scrape('movie', 'tt'. $feature->torrent->imdb); @endphp
|
||||
@endif
|
||||
@endif
|
||||
@if ($feature->torrent->category->game_meta)
|
||||
@php $meta = MarcReichel\IGDBLaravel\Models\Game::with(['artworks' => ['url', 'image_id'], 'genres' => ['name']])->find($feature->torrent->igdb); @endphp
|
||||
@endif
|
||||
<div class="item">
|
||||
<div id="movie-card-list">
|
||||
<div class="tags">
|
||||
{{ ++$key }}
|
||||
</div>
|
||||
<div class="movie-card" style="background-image: url({{ $meta->backdrop }});">
|
||||
@if ($feature->torrent->category->tv_meta || $feature->torrent->category->movie_meta)
|
||||
<div class="movie-card" style="background-image: url({{ $meta->backdrop }});">
|
||||
@endif
|
||||
@if ($feature->torrent->category->game_meta)
|
||||
<div class="movie-card" style="background-image: url('https://images.igdb.com/igdb/image/upload/t_original/{{ $meta->artworks[0]['image_id'] }}.jpg');">
|
||||
@endif
|
||||
<div class="color-overlay">
|
||||
<div class="movie-content">
|
||||
<div class="movie-header">
|
||||
<a href="{{ route('torrent', ['slug' => $feature->torrent->slug, 'id' => $feature->torrent->id]) }}">
|
||||
<h1 class="movie-title">{{ $feature->torrent->name }}</h1></a>
|
||||
<h4 class="movie-info">
|
||||
@if ($meta->genres)
|
||||
@if (isset($meta) && $meta->genres)
|
||||
@foreach ($meta->genres as $genre)
|
||||
| {{ $genre }} |
|
||||
@if ($feature->torrent->category->tv_meta || $feature->torrent->category->movie_meta)
|
||||
| {{ $genre }} |
|
||||
@endif
|
||||
@if ($feature->torrent->category->game_meta)
|
||||
| {{ $genre->name }} |
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
</h4>
|
||||
</div>
|
||||
<span class="movie-desc">
|
||||
{{ Str::limit(strip_tags($meta->plot), 200) }}...
|
||||
@if ($feature->torrent->category->tv_meta || $feature->torrent->category->movie_meta)
|
||||
{{ Str::limit(strip_tags($meta->plot), 200) }}...
|
||||
@endif
|
||||
@if ($feature->torrent->category->game_meta)
|
||||
{{ Str::limit(strip_tags($meta->summary), 200) }}...
|
||||
@endif
|
||||
<br>
|
||||
<br>
|
||||
<ul class="list-inline">
|
||||
|
||||
@@ -67,6 +67,11 @@
|
||||
<input type="number" name="mal" value="0" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">IGDB ID <b>(@lang('request.required'))</b></label>
|
||||
<input type="number" name="igdb" value="{{ old('igdb') ?? '0' }}" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="category_id">@lang('request.category')</label>
|
||||
<select name="category_id" class="form-control">
|
||||
|
||||
@@ -66,6 +66,11 @@
|
||||
required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="name">IGDB ID <b>(@lang('request.required'))</b></label>
|
||||
<input type="number" name="igdb" value="{{ $torrentRequest->igdb }}" class="form-control" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="category_id">@lang('request.category')</label>
|
||||
<select name="category_id" class="form-control">
|
||||
|
||||
@@ -0,0 +1,96 @@
|
||||
<div class="movie-wrapper">
|
||||
<div class="movie-backdrop"
|
||||
@if (isset($meta) && $meta->artworks)
|
||||
style="background-image: url('https://images.igdb.com/igdb/image/upload/t_original/{{ $meta->artworks[0]['image_id'] }}.jpg')">
|
||||
@else
|
||||
style="background-image: url('https://via.placeholder.com/1400x800')">
|
||||
@endif
|
||||
<div class="tags">
|
||||
{{ $torrentRequest->category->name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="movie-overlay"></div>
|
||||
<div class="container movie-container">
|
||||
<div class="row movie-row ">
|
||||
<div class="col-xs-12 col-sm-8 col-md-8 col-sm-push-4 col-md-push-3 movie-heading-box">
|
||||
<h1 class="movie-heading">
|
||||
@if (isset($meta) && $meta->name)
|
||||
<span class="text-bold">{{ $meta->name }}</span>
|
||||
<span class="text-bold"><em> ({{ date('Y', strtotime( $meta->first_release_date)) }}) </em></span>
|
||||
@else
|
||||
<span class="text-bold">@lang('torrent.no-meta')</span>
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
<br>
|
||||
|
||||
<span class="movie-overview">
|
||||
@if (isset($meta) && $meta->summary)
|
||||
{{ Str::limit($meta->summary, $limit = 350, $end = '...') }}
|
||||
@endif
|
||||
</span>
|
||||
|
||||
<span class="movie-details">
|
||||
@if (isset($meta) && $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 }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</span>
|
||||
|
||||
<span class="movie-details">
|
||||
@if (isset($meta) && $meta->url && $torrentRequest->igdb != 0 && $torrentRequest->igdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="{{ $meta->url }}" title="IMDB" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-gamepad"></i> IGDB: {{ $torrentRequest->igdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if (isset($meta) && $meta->videos)
|
||||
<span style="cursor: pointer;" class="badge-user text-bold show-trailer">
|
||||
<a class="text-pink" title="@lang('torrent.trailer')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-external-link"></i> @lang('torrent.trailer')
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@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>
|
||||
{{ $meta->rating }}/100 ({{ $meta->rating_count }} @lang('torrent.votes'))
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<div class="row cast-list">
|
||||
@if (isset($characters))
|
||||
@foreach($characters as $character)
|
||||
<div class="col-xs-4 col-md-2 text-center">
|
||||
<img class="img-people" src="{{ $character->img_url }}">
|
||||
<a href="https://www.themoviedb.org/person/{{ $character->id }}" title="TheMovieDatabase" target="_blank">
|
||||
<span class="badge-user" style="white-space:normal;">
|
||||
<strong>{{ $character->name }}</strong>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</span>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-4 col-md-3 col-sm-pull-8 col-md-pull-8">
|
||||
@if (isset($meta) && $meta->cover)
|
||||
<img src="https://images.igdb.com/igdb/image/upload/t_original/{{ $meta->cover->image_id }}.jpg" class="movie-poster img-responsive hidden-xs">
|
||||
@else
|
||||
<img src="https://via.placeholder.com/600x900" class="movie-poster img-responsive hidden-xs">
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,138 @@
|
||||
<div class="movie-wrapper">
|
||||
<div class="movie-backdrop"
|
||||
style="background-image: url({{ $meta->backdrop ?? 'https://via.placeholder.com/1400x800' }});">
|
||||
<div class="tags">
|
||||
{{ $torrentRequest->category->name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="movie-overlay"></div>
|
||||
<div class="container movie-container">
|
||||
<div class="row movie-row ">
|
||||
|
||||
<div class="col-xs-12 col-sm-8 col-md-8 col-sm-push-4 col-md-push-3 movie-heading-box">
|
||||
<h1 class="movie-heading">
|
||||
@if ($meta->title)
|
||||
<span class="text-bold">{{ $meta->title }}</span>
|
||||
<span class="text-bold"><em> {{ $meta->releaseYear }}</em></span>
|
||||
@else
|
||||
<span class="text-bold">@lang('torrent.no-meta')</span>
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
<br>
|
||||
|
||||
<span class="movie-overview">
|
||||
{{ Str::limit($meta->plot, $limit = 350, $end = '...') }}
|
||||
</span>
|
||||
|
||||
<span class="movie-details">
|
||||
@if ($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 }}
|
||||
</span>
|
||||
@endforeach
|
||||
@endif
|
||||
</span>
|
||||
|
||||
<span class="movie-details">
|
||||
@if ($meta->rated )
|
||||
<span class="badge-user text-bold text-orange">
|
||||
@lang('torrent.rated'): {{ $meta->rated }}
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($meta->runtime )
|
||||
<span class="badge-user text-bold text-orange">
|
||||
@lang('torrent.runtime'): {{ $meta->runtime }} @lang('common.minute')@lang('common.plural-suffix')
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($meta->imdbRating || $meta->tmdbRating)
|
||||
<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>
|
||||
@if ($user->ratings == 1)
|
||||
{{ $meta->imdbRating }}/10 ({{ $meta->imdbVotes }} @lang('torrent.votes'))
|
||||
@else
|
||||
{{ $meta->tmdbRating }}/10 ({{ $meta->tmdbVotes }} @lang('torrent.votes'))
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
</span>
|
||||
|
||||
<span class="movie-details">
|
||||
@if ($torrentRequest->category->movie_meta || $torrentRequest->category->tv_meta && $torrentRequest->imdb != 0 && $torrentRequest->imdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.imdb.com/title/tt{{ $torrentRequest->imdb }}" title="IMDB" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-film"></i> IMDB: {{ $torrentRequest->imdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrentRequest->category->tv_meta && $torrentRequest->tmdb != 0 && $torrentRequest->tmdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.themoviedb.org/tv/{{ $meta->tmdb }}" title="TheMovieDatabase" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-film"></i> TMDB: {{ $meta->tmdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrentRequest->category->movie_meta && $torrentRequest->tmdb != 0 && $torrentRequest->tmdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.themoviedb.org/movie/{{ $meta->tmdb }}" title="TheMovieDatabase" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-film"></i> TMDB: {{ $meta->tmdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrentRequest->category->movie_meta || $torrentRequest->category->tv_meta && $torrentRequest->mal != 0 && $torrentRequest->mal != null)
|
||||
<span class="badge-user text-bold text-pink">
|
||||
<a href="https://myanimelist.net/anime/{{ $torrentRequest->mal }}" title="MAL" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-film"></i> MAL: {{ $torrentRequest->mal }}</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($torrentRequest->category->tv_meta && $torrentRequest->tvdb != 0 && $torrentRequest->tvdb != null)
|
||||
<span class="badge-user text-bold text-pink">
|
||||
<a href="https://www.thetvdb.com/?tab=series&id={{ $torrentRequest->tvdb }}" title="TVDB" target="_blank">
|
||||
<i class="{{ config("other.font-awesome") }} fa-film"></i> TVDB: {{ $torrentRequest->tvdb }}
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
@if ($meta->videoTrailer != '')
|
||||
<span style="cursor: pointer;" class="badge-user text-bold show-trailer">
|
||||
<a class="text-pink" title="@lang('torrent.trailer')">
|
||||
<i class="{{ config('other.font-awesome') }} fa-external-link"></i> @lang('torrent.trailer')
|
||||
</a>
|
||||
</span>
|
||||
@endif
|
||||
|
||||
<div class="row cast-list">
|
||||
@if ($meta->actors)
|
||||
@php $client = new \App\Services\MovieScrapper(config('api-keys.tmdb'), config('api-keys.tvdb'), config('api-keys.omdb')); @endphp
|
||||
@foreach (array_slice($meta->actors, 0,6) as $actor)
|
||||
@php $person = $client->person($actor->tmdb); @endphp
|
||||
<div class="col-xs-4 col-md-2 text-center">
|
||||
<img class="img-people" src="{{ $person->photo }}">
|
||||
<a href="https://www.themoviedb.org/person/{{ $actor->tmdb }}" title="TheMovieDatabase" target="_blank">
|
||||
<span class="badge-user" style="white-space:normal;">
|
||||
<strong>{{ $actor->name }}</strong>
|
||||
</span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-4 col-md-3 col-sm-pull-8 col-md-pull-8">
|
||||
<img src="{{ $meta->poster ?? 'https://via.placeholder.com/600x900' }}" class="movie-poster img-responsive hidden-xs">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -64,128 +64,23 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@if (! $torrentRequest->category->no_meta)
|
||||
<div class="movie-wrapper">
|
||||
<div class="movie-backdrop" style="background-image: url({{ $meta->backdrop ?? 'https://via.placeholder.com/1400x800' }});">
|
||||
<div class="tags">
|
||||
{{ $torrentRequest->category->name }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="movie-overlay"></div>
|
||||
<div class="container movie-container">
|
||||
<div class="row movie-row ">
|
||||
<div class="col-xs-12 col-sm-8 col-md-8 col-sm-push-4 col-md-push-3 movie-heading-box">
|
||||
<h1 class="movie-heading">
|
||||
@if ($meta->title)
|
||||
<span class="text-bold">{{ $meta->title }}</span><span
|
||||
class="text-bold"><em> {{ $meta->releaseYear }}</em></span>
|
||||
@else
|
||||
<span class="text-bold">Sorry Not Meta Found</span>
|
||||
@endif
|
||||
@if ($meta->imdbRating || $meta->tmdbRating)
|
||||
<span class="badge-user text-bold text-gold">@lang('torrent.rating'):
|
||||
<span class="movie-rating-stars">
|
||||
<i class="{{ config('other.font-awesome') }} fa-thumbs-up"></i>
|
||||
</span>
|
||||
@if ($user->ratings == 1)
|
||||
{{ $meta->imdbRating }}/10({{ $meta->imdbVotes }} @lang('torrent.votes')
|
||||
)
|
||||
@else
|
||||
{{ $meta->tmdbRating }}/10({{ $meta->tmdbVotes }} @lang('torrent.votes')
|
||||
)
|
||||
@endif
|
||||
</span>
|
||||
@endif
|
||||
</h1>
|
||||
<br>
|
||||
<span class="movie-overview">
|
||||
{{ $meta->plot }}
|
||||
</span>
|
||||
<ul class="movie-details">
|
||||
<li>
|
||||
@if ($meta->genres)
|
||||
@foreach ($meta->genres as $genre)
|
||||
<span class="badge-user text-bold text-green">{{ $genre }}</span>
|
||||
@endforeach
|
||||
@endif
|
||||
@if ($meta->rated )
|
||||
<span class="badge-user text-bold text-orange">@lang('torrent.rated')
|
||||
: {{ $meta->rated }} </span>
|
||||
@endif
|
||||
@if ($meta->runtime )
|
||||
<span class="badge-user text-bold text-orange">@lang('torrent.runtime')
|
||||
: {{ $meta->runtime }} @lang('common.minute')@lang('common.plural-suffix')</span>
|
||||
@endif
|
||||
</li>
|
||||
<li>
|
||||
@if ($torrentRequest->imdb != 0 && $torrentRequest->imdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.imdb.com/title/tt{{ $torrentRequest->imdb }}" title="IMDB"
|
||||
target="_blank">IMDB: {{ $torrentRequest->imdb }}</a>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrentRequest->category_id == "2" && $torrentRequest->tmdb != 0 && $torrentRequest->tmdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.themoviedb.org/tv/{{ $torrentRequest->tmdb }}?language={{ config('app.locale') }}"
|
||||
title="TheMovieDatabase" target="_blank">TMDB: {{ $torrentRequest->tmdb }}</a>
|
||||
</span>
|
||||
@elseif ($torrentRequest->tmdb != 0 && $torrentRequest->tmdb != null)
|
||||
<span class="badge-user text-bold text-orange">
|
||||
<a href="https://www.themoviedb.org/movie/{{ $torrentRequest->tmdb }}?language={{ config('app.locale') }}"
|
||||
title="TheMovieDatabase" target="_blank">TMDB: {{ $torrentRequest->tmdb }}</a>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrentRequest->mal != 0 && $torrentRequest->mal != null)
|
||||
<span class="badge-user text-bold text-pink">
|
||||
<a href="https://myanimelist.net/anime/{{ $torrentRequest->mal }}"
|
||||
title="MAL" target="_blank">MAL: {{ $torrentRequest->mal }}</a>
|
||||
</span>
|
||||
@endif
|
||||
@if ($torrentRequest->category_id == "2" && $torrentRequest->tvdb != 0 && $torrentRequest->tvdb != null)
|
||||
<span class="badge-user text-bold text-pink">
|
||||
<a
|
||||
href="https://www.thetvdb.com/?tab=series&id={{ $torrentRequest->tvdb }}"
|
||||
title="TVDB" target="_blank">TVDB: {{ $torrentRequest->tvdb }}</a>
|
||||
</span>
|
||||
@endif
|
||||
@if ($meta->videoTrailer != '')
|
||||
<span onclick="showTrailer()" style="cursor: pointer;"
|
||||
class="badge-user text-bold">
|
||||
<a class="text-pink" title="View Trailer">@lang('torrent.view-trailer') <i
|
||||
class="{{ config('other.font-awesome') }} fa-external-link"></i></a>
|
||||
</span>
|
||||
@endif
|
||||
</li>
|
||||
<br>
|
||||
<li>
|
||||
<div class="row cast-list">
|
||||
@if ($meta->actors)
|
||||
@php $client = new \App\Services\MovieScrapper(config('api-keys.tmdb'), config('api-keys.tvdb'), config('api-keys.omdb')); @endphp
|
||||
@foreach (array_slice($meta->actors, 0,6) as $actor)
|
||||
@php $person = $client->person($actor->tmdb); @endphp
|
||||
<div class="col-xs-4 col-md-2 text-center">
|
||||
<img class="img-people" src="{{ $person->photo }}">
|
||||
<a
|
||||
href="https://www.themoviedb.org/person/{{ $actor->tmdb }}?language={{ config('app.locale') }}"
|
||||
title="TheMovieDatabase" target="_blank">
|
||||
<span class="badge-user"
|
||||
style="white-space:normal;"><strong>{{ $actor->name }}</strong></span>
|
||||
</a>
|
||||
</div>
|
||||
@endforeach
|
||||
@endif
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12 col-sm-4 col-md-3 col-sm-pull-8 col-md-pull-8">
|
||||
<img src="{{ $meta->poster ?? 'https://via.placeholder.com/600x900' }}" class="movie-poster img-responsive hidden-xs">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{-- Movie/TV Meta Data --}}
|
||||
@if ($torrentRequest->category->movie_meta || $torrentRequest->category->tv_meta)
|
||||
@include('requests.partials.movie_tv_meta')
|
||||
@endif
|
||||
{{-- /Movie/TV Meta Data --}}
|
||||
|
||||
{{-- Game Meta Data --}}
|
||||
@if ($torrentRequest->category->game_meta)
|
||||
@include('requests.partials.game_meta')
|
||||
@endif
|
||||
{{-- /Game Meta Data --}}
|
||||
|
||||
{{-- Music Meta Data --}}
|
||||
{{--To Be Added Via Partials --}}
|
||||
{{-- /Music Meta Data --}}
|
||||
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-bordered table-striped">
|
||||
<tbody>
|
||||
@@ -273,9 +168,11 @@
|
||||
data-target="#claim"><i class="{{ config('other.font-awesome') }} fa-hand-paper">
|
||||
</i> @lang('request.claim')
|
||||
</button>
|
||||
<a href="{{ route('upload_form', ['title' => $meta->title, 'imdb' => $meta->imdb, 'tmdb' => $meta->tmdb]) }}"
|
||||
class="btn btn-md btn-success"><i class="{{ config('other.font-awesome') }} fa-upload"></i> @lang('common.upload')
|
||||
</a>
|
||||
@if ($torrentRequest->category->movie_meta || $torrentRequest->category->tv_meta)
|
||||
<a href="{{ route('upload_form', ['title' => $meta->title, 'imdb' => $meta->imdb, 'tmdb' => $meta->tmdb]) }}"
|
||||
class="btn btn-md btn-success"><i class="{{ config('other.font-awesome') }} fa-upload"></i> @lang('common.upload')
|
||||
</a>
|
||||
@endif
|
||||
@elseif ($torrentRequest->filled_hash != null && $torrentRequest->approved_by == null)
|
||||
<button class="btn btn-xs btn-warning" disabled><i
|
||||
class="{{ config('other.font-awesome') }} fa-question-circle"></i>@lang('request.pending')
|
||||
|
||||
@@ -56,6 +56,9 @@
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" id="mal" placeholder="MAL #">
|
||||
</div>
|
||||
<div class="col-sm-2">
|
||||
<input type="text" class="form-control" id="igdb" placeholder="IGDB #">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
@@ -192,6 +195,7 @@
|
||||
var tvdb = $("#tvdb").val();
|
||||
var tmdb = $("#tmdb").val();
|
||||
var mal = $("#mal").val();
|
||||
var igdb = $("#igdb").val();
|
||||
var categories = [];
|
||||
var types = [];
|
||||
var sorting = $("#sorting").val();
|
||||
@@ -242,6 +246,7 @@
|
||||
tvdb: tvdb,
|
||||
tmdb: tmdb,
|
||||
mal: mal,
|
||||
igdb: igdb,
|
||||
categories: categories,
|
||||
types: types,
|
||||
myrequests: myrequests,
|
||||
@@ -292,6 +297,11 @@
|
||||
faceted();
|
||||
})
|
||||
</script>
|
||||
<script nonce="{{ Bepsvpt\SecureHeaders\SecureHeaders::nonce() }}">
|
||||
$("#igdb").keyup(function () {
|
||||
faceted();
|
||||
})
|
||||
</script>
|
||||
<script nonce="{{ Bepsvpt\SecureHeaders\SecureHeaders::nonce() }}">
|
||||
$(".category,.type").on("click", function () {
|
||||
faceted();
|
||||
|
||||
Reference in New Issue
Block a user