diff --git a/plugin/PlayLists/player.php b/plugin/PlayLists/player.php index fc0a755fe..4cc645de5 100644 --- a/plugin/PlayLists/player.php +++ b/plugin/PlayLists/player.php @@ -1,345 +1,353 @@ $value) { if(!User::isAdmin() && !Video::userGroupAndVideoGroupMatch($users_id, $value['videos_id'])){ + $messagesFromPlayList[] = "videos_id={$value['videos_id']} UserGroups do not match"; unset($playList[$key]); continue; } if ($value['type'] === 'embed') { $sources[0]['type'] = 'video'; $sources[0]['url'] = $value["videoLink"]; } else { $sources = getVideosURL($value['filename']); } $images = Video::getImageFromFilename($value['filename'], $value['type']); $externalOptions = _json_decode($value['externalOptions']); $src = new stdClass(); $src->src = $images->thumbsJpg; $thumbnail = array($src); $playListSources = array(); foreach ($sources as $value2) { if ($value2['type'] !== 'video' && $value2['type'] !== 'audio' && $value2['type'] !== 'serie') { continue; } $playListSources[] = new playListSource($value2['url'], $value['type'] === 'embed'); } if (empty($playListSources)) { + $messagesFromPlayList[] = "videos_id={$value['videos_id']} empty playlist source "; continue; } $playListData[] = new PlayListElement($value['title'], $value['description'], $value['duration'], $playListSources, $thumbnail, $images->poster, parseDurationToSeconds(@$externalOptions->videoStartSeconds), $value['cre'], $value['likes'], $value['views_count'], $value['videos_id']); } $video = PlayLists::isPlayListASerie($_GET['playlists_id']); $playlist_index = intval(@$_REQUEST['playlist_index']); if (!empty($video['id'])) { AVideoPlugin::getEmbed($video['id']); setVideos_id($video['id']); } else if (!empty($playListData[$playlist_index])) { setVideos_id($playListData[$playlist_index]->getVideos_id()); $video = Video::getVideo($playListData[$playlist_index]->getVideos_id()); } +if(empty($playListData)){ + videoNotFound(implode('
', $messagesFromPlayList)); +} + ?> <?php echo $playListObj->getName() . $config->getPageTitleSeparator() . $config->getWebSiteTitle(); ?> showChannelBannerOnModeYoutube)) { ?>
showAdsenseBannerOnTop)) { ?>
'; echo PlayerSkins::getMediaTag($video['filename'], $htmlMediaTag); ?>
"/>




! videoNotFoundText->value) ? __("We have not found any videos or audios to show") : $advancedCustom->videoNotFoundText->value; ?>.