From 73e376baa4ac938149d93abc449185d2d11b0f46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E3=83=86=E3=82=AF=E3=83=8B=E3=82=AB=E3=83=AB=E8=AB=8F?= =?UTF-8?q?=E8=A8=AA=E5=AD=90?= Date: Tue, 21 Dec 2021 21:02:25 +0900 Subject: [PATCH] =?UTF-8?q?=E3=81=94=E3=82=81=E3=82=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Peertube/Watch.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Peertube/Watch.php b/app/Http/Controllers/Peertube/Watch.php index dcc6514..00df08f 100644 --- a/app/Http/Controllers/Peertube/Watch.php +++ b/app/Http/Controllers/Peertube/Watch.php @@ -21,7 +21,12 @@ class Watch extends Common { ]; $res['detail'] = $this->getDetail($id); $res['comment'] = $this->getComment($id); - $res['recommend'] = $this->getRecommend($res['detail']->tags); + + $tags = []; + if (!is_null($res['detail']->tags)) $tags = $res['detail']->tags; + else $tags = explode(' ', $res['detail']->title); + + $res['recommend'] = $this->getRecommend($tags); return view('pages.peertube.w', ['res' => $res]); }