From 190a07089c796810509bbe01cb5490360ea47fa6 Mon Sep 17 00:00:00 2001 From: HDVinnie Date: Sun, 6 Dec 2020 17:06:25 -0500 Subject: [PATCH] update: mediahub movie view --- .../Controllers/MediaHub/MovieController.php | 19 +- resources/views/mediahub/movie/show.blade.php | 1051 ++++++----------- 2 files changed, 388 insertions(+), 682 deletions(-) diff --git a/app/Http/Controllers/MediaHub/MovieController.php b/app/Http/Controllers/MediaHub/MovieController.php index ca283880d..d7cbf4578 100644 --- a/app/Http/Controllers/MediaHub/MovieController.php +++ b/app/Http/Controllers/MediaHub/MovieController.php @@ -13,7 +13,10 @@ namespace App\Http\Controllers\MediaHub; +use Illuminate\Http\Request; +use App\Models\PersonalFreeleech; use App\Http\Controllers\Controller; +use App\Models\Movie; class MovieController extends Controller { @@ -30,17 +33,21 @@ class MovieController extends Controller /** * Show A Movie. * - * @param $id + * @param \Illuminate\Http\Request $request + * @param $id * - * @return void + * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ - public function show($id) + public function show(Request $request, $id) { - /*$movie = Movie::with(['collection', 'genres', 'companies'])->findOrFail($id); + $user = $request->user(); + $personal_freeleech = PersonalFreeleech::where('user_id', '=', $user->id)->first(); + $movie = Movie::with(['collection', 'genres', 'companies'])->findOrFail($id); return view('mediahub.movie.show', [ 'movie' => $movie, - ]);*/ - abort(307); + 'user' => $user, + 'personal_freeleech' => $personal_freeleech, + ]); } } diff --git a/resources/views/mediahub/movie/show.blade.php b/resources/views/mediahub/movie/show.blade.php index a5e12824f..cb643470f 100644 --- a/resources/views/mediahub/movie/show.blade.php +++ b/resources/views/mediahub/movie/show.blade.php @@ -29,695 +29,394 @@ @section('content')
-
-
-
-
-
-
-
- Bloodshot -
-
-
-
-

Bloodshot (2020-02-20)

-

- Action | - Science Fiction | -

- -
- - -
-
-
-

Directed By: - Dave Wilson -

-

Star Cast: - Vin Diesel , - Eiza González , - Sam Heughan , - Toby Kebbell , -

-
-
-
-
-
+
+
+
+ Movie
-
-
+
+
+
-
-
-
-
+
+

+ {{ $movie->title ?? 'No Meta Found' }} + @if(isset($movie->release_date)) + ({{ substr($movie->release_date, 0, 4) }}) + @endif +

-
-

Videos Playlist

-
-
- -
+
+ + {{ Str::limit($movie->overview ?? '', $limit = 350, $end = '...') }} + -
+ + @if (isset($movie->genres)) + @foreach ($movie->genres as $genre) + + {{ $genre->name }} + + @endforeach + @endif + + + + + Status: {{ $movie->status ?? 'Unknown' }} + + + + @lang('torrent.runtime'): {{ $movie->runtime ?? 0 }} + @lang('common.minute')@lang('common.plural-suffix') + + + @lang('torrent.rating'): + + + + {{ $movie->vote_average ?? '0' }}/10 ({{ $movie->vote_count ?? '0' }} @lang('torrent.votes')) + + + + + @if ($movie->imdb_id != 0 && $movie->imdb_id != null) + + + IMDB: {{ $movie->imdb_id }} + + + @endif + + + + TMDB: {{ $movie->id }} + + + +
+ @if (isset($movie->cast)) + @foreach ($movie->cast as $actor) + - -
- ad -
- -
-

Similar Collection

-
-
- -
-
- -
-
- -
-
- -
-
-
- - - - -
-
- -
-
-
-
- - - -
    -
  • - Status: - Released -
  • -
  • - Runtime: - 110m -
  • -
  • - Popularity: - 363.548 -
  • -
  • - Language: - en -
  • -
- - -
    -
  • - Budget: - $42,000,000 -
  • -
  • - Revenue: - $24,573,617 -
  • -
- - -
    -
  • - Vote Average: - 7 -
  • -
  • - Vote Count: - 395 -
  • -
- - - - - -
-
+ @endforeach + @endif
- -
-
-
+
- +
+ + + + + + + + + + + + + + @foreach ($movie->torrents as $torrent) + @if ($torrent->sticky == 1) + + @else + + @endif + + + + + + + + + + @endforeach + +
@lang('torrent.category')@lang('torrent.name')
+ +
+ +
+
+
+ + {{ $torrent->type->name }} + +
+
+ + {{ $torrent->name }} + + @if (config('torrent.download_check_page') == 1) + + + + @else + + + + @endif + + @php $history = \App\Models\History::where('user_id', '=', $user->id)->where('info_hash', '=', $torrent->info_hash)->first(); @endphp + @if ($history) + @if ($history->seeder == 1 && $history->active == 1) + + @endif + + @if ($history->seeder == 0 && $history->active == 1) + + @endif + + @if ($history->seeder == 0 && $history->active == 0 && $history->completed_at == null) + + @endif + + @if ($history->seeder == 0 && $history->active == 0 && $history->completed_at != null) + + @endif + @endif + +
+ @if ($torrent->anon == 1) + + @lang('common.anonymous') + @if ($user->id == $torrent->user->id || $user->group->is_modo) + + ({{ $torrent->user->username }}) + + @endif + + @else + + + + {{ $torrent->user->username }} + + + @endif + + @if ($torrent->category->movie_meta || $torrent->category->tv_meta) + + + + + {{ $meta->vote_average ?? 0 }}/10 ({{ $meta->vote_count ?? 0 }} @lang('torrent.votes')) + + @endif + + + + {{ $torrent->thanks_count }} + + + + + {{ $torrent->comments_count }} + + + @if ($torrent->internal == 1) + + @lang('torrent.internal') + + @endif + + @if ($torrent->stream == 1) + + + @lang('torrent.stream-optimized') + + @endif + + @if ($torrent->featured == 0) + @if ($torrent->doubleup == 1) + + @lang('torrent.double-upload') + + @endif + @if ($torrent->free == 1) + + @lang('torrent.freeleech') + + @endif + @endif + + @if ($personal_freeleech) + + @lang('torrent.personal-freeleech') + + @endif + + @php $freeleech_token = \App\Models\FreeleechToken::where('user_id', '=', $user->id)->where('torrent_id', '=', $torrent->id)->first(); @endphp + @if ($freeleech_token) + + @lang('torrent.freeleech-token') + + @endif + + @if ($torrent->featured == 1) + + @lang('torrent.featured') + + @endif + + @if ($user->group->is_freeleech == 1) + + @lang('torrent.special-freeleech') + + @endif + + @if (config('other.freeleech') == 1) + + @lang('torrent.global-freeleech') + + @endif + + @if (config('other.doubleup') == 1) + + @lang('torrent.double-upload') + + @endif + + @if ($user->group->is_double_upload == 1) + + @lang('torrent.special-double_upload') + + @endif + + @if ($torrent->leechers >= 5) + + + @lang('common.hot')! + + @endif + + @if ($torrent->sticky == 1) + + @lang('torrent.sticky') + + @endif + + @if ($user->updated_at->getTimestamp() < $torrent->created_at->getTimestamp()) + + @lang('common.new') + + @endif + + @if ($torrent->highspeed == 1) + + @lang('common.high-speeds') + + @endif + + @if ($torrent->sd == 1) + + @lang('torrent.sd-content') + + @endif +
+ + + {{ $torrent->getSize() }} + + + + {{ $torrent->seeders }} + + + + + + {{ $torrent->leechers }} + + + + + + {{ $torrent->times_completed }} @lang('common.times') + + +