1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 18:29:39 +02:00
This commit is contained in:
daniel 2019-02-28 05:56:01 -03:00
parent 0ae428150a
commit b55b488f46

View file

@ -142,7 +142,11 @@ class API extends PluginAbstract {
global $global; global $global;
require_once $global['systemRootPath'] . 'objects/video.php'; require_once $global['systemRootPath'] . 'objects/video.php';
$obj = $this->startResponseObject($parameters); $obj = $this->startResponseObject($parameters);
if (!empty($parameters['videos_id'])) { $dataObj = $this->getDataObject();
if($dataObj->APISecret===@$_GET['APISecret']){
$rows = Video::getAllVideos("viewable", true, true);
$totalRows = Video::getTotalVideos("viewable", true, true);
}else if (!empty($parameters['videos_id'])) {
$rows = Video::getVideo($parameters['videos_id']); $rows = Video::getVideo($parameters['videos_id']);
$totalRows = empty($rows) ? 0 : 1; $totalRows = empty($rows) ? 0 : 1;
} else if (!empty($parameters['clean_title'])) { } else if (!empty($parameters['clean_title'])) {