update: tv mediahub

- properly link matched torrents
This commit is contained in:
HDVinnie
2022-02-07 17:40:19 -05:00
parent c97109a3cc
commit 9099771956
2 changed files with 3 additions and 3 deletions
@@ -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', [
+2 -2
View File
@@ -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]) }}"