diff --git a/app/Http/Controllers/TorrentController.php b/app/Http/Controllers/TorrentController.php index 008e0e660..2ebdfa3e7 100644 --- a/app/Http/Controllers/TorrentController.php +++ b/app/Http/Controllers/TorrentController.php @@ -202,7 +202,11 @@ class TorrentController extends Controller 'platforms', ]) ->find($torrent->igdb); $link = collect($meta->videos)->take(1)->pluck('video_id'); - $trailer = 'https://www.youtube.com/embed/'.$link[0]; + if (isset($link[0])) { + $trailer = 'https://www.youtube.com/embed/'.isset($link[0]); + } else { + $trailer = '/img/no-video.png'; + } $platforms = PlatformLogo::whereIn('id', collect($meta->platforms)->pluck('platform_logo')->toArray())->get(); } diff --git a/public/img/no-video.png b/public/img/no-video.png new file mode 100644 index 000000000..51e6c413e Binary files /dev/null and b/public/img/no-video.png differ