mirror of
https://github.com/HDInnovations/UNIT3D-Community-Edition.git
synced 2026-05-02 08:19:33 -05:00
update: tv mediahub
- properly link matched torrents
This commit is contained in:
@@ -24,7 +24,7 @@ class TvSeasonController extends Controller
|
||||
*/
|
||||
public function show(int $id): \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
{
|
||||
$season = Season::with(['episodes'])->findOrFail($id);
|
||||
$season = Season::with(['episodes', 'torrents'])->findOrFail($id);
|
||||
$show = Tv::where('id', '=', $season->tv_id)->first();
|
||||
|
||||
return \view('mediahub.tv.season.show', [
|
||||
|
||||
@@ -71,7 +71,7 @@
|
||||
<div class="card_footer text-center">
|
||||
<a data-toggle="collapse" data-target="#{{ $season->season_number }}">
|
||||
<i class="fas fa-chevron-double-down"></i> <span
|
||||
class="badge-user text-bold"> {{ $season->torrents()->count() }} Torrents Matched</span>
|
||||
class="badge-user text-bold"> {{ $season->torrents->where('season_number', '=', $season->season_number)->count() }} Torrents Matched</span>
|
||||
<i class="fas fa-chevron-double-down"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -89,7 +89,7 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach($season->torrents->sortByDesc('created_at') as $torrent)
|
||||
@foreach($season->torrents->where('season_number', '=', $season->season_number)->sortByDesc('created_at') as $torrent)
|
||||
<tr>
|
||||
<td>
|
||||
<a href="{{ route('torrent', ['id' => $torrent->id]) }}"
|
||||
|
||||
Reference in New Issue
Block a user