From 13426cc53c26b757c3649993e8f7cb7cac3a8f9b Mon Sep 17 00:00:00 2001 From: Daniel Neto Date: Tue, 10 Dec 2024 17:06:25 -0300 Subject: [PATCH] https://github.com/WWBN/AVideo/issues/9663 --- view/modeYoutube.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/view/modeYoutube.php b/view/modeYoutube.php index a973eb716733..f51be7e13621 100644 --- a/view/modeYoutube.php +++ b/view/modeYoutube.php @@ -174,12 +174,14 @@ $modeYouTubeTimeLog['Code part 1.5'] = microtime(true) - $modeYouTubeTime; $modeYouTubeTime = microtime(true); if (!empty($video['id'])) { - $autoPlayVideo = Video::getRandom($video['id'], 'suggested'); + //$numRows = Video::getTotalVideos(Video::SORT_TYPE_SUGGESTED, false, false, false, true, true); + /* + $autoPlayVideo = Video::getRandom($video['id'], Video::SORT_TYPE_SUGGESTED); if(!empty($_GET['debug'])){ var_dump(__FILE__, __LINE__, $lastGetVideoSQL, $lastGetTotalVideos); } - //var_dump($autoPlayVideo['id']);exit; - if (empty($autoPlayVideo['id'])) { + */ + if (empty($autoPlayVideo) || empty($autoPlayVideo['id'])) { $autoPlayVideo = Video::getRandom($video['id']); } }