fixing tagview #2
This commit is contained in:
@@ -40,9 +40,9 @@ class TagviewController extends Controller
|
||||
public function showVideo($shortname, $id = null)
|
||||
{
|
||||
// return $shortname;
|
||||
|
||||
$tags = app(TagService::class)->buildTagArray($shortname);
|
||||
if (is_null($id)) {
|
||||
$video = Video::getRandom($shortname, true);
|
||||
$video = Video::getRandom($tags, true);
|
||||
|
||||
if (!($video instanceof RedirectResponse)) {
|
||||
$video = $video->first();
|
||||
@@ -54,7 +54,7 @@ class TagviewController extends Controller
|
||||
} else {
|
||||
// Don't filter on specific video.
|
||||
// TODO: Add warning page
|
||||
$video = Video::withAnyTags($shortname)->find($id);
|
||||
$video = Video::withAllTags($tags)->find($id);
|
||||
}
|
||||
|
||||
if (is_null($video)) {
|
||||
|
Reference in New Issue
Block a user