mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
parent
68e02d5d7e
commit
08a97ae738
1 changed files with 8 additions and 4 deletions
|
@ -144,12 +144,16 @@ class API extends PluginAbstract {
|
|||
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||
$obj = $this->startResponseObject($parameters);
|
||||
$dataObj = $this->getDataObject();
|
||||
if ($dataObj->APISecret === @$_GET['APISecret']) {
|
||||
if (!empty($parameters['videos_id'])) {
|
||||
$status = "viewable";
|
||||
if ($dataObj->APISecret === @$_GET['APISecret']) {
|
||||
$status = "";
|
||||
}
|
||||
$rows = array(Video::getVideo($parameters['videos_id'], $status));
|
||||
$totalRows = empty($rows) ? 0 : 1;
|
||||
} else if ($dataObj->APISecret === @$_GET['APISecret']) {
|
||||
$rows = Video::getAllVideos("viewable", false, true);
|
||||
$totalRows = Video::getTotalVideos("viewable", false, true);
|
||||
} else if (!empty($parameters['videos_id'])) {
|
||||
$rows = array(Video::getVideo($parameters['videos_id']));
|
||||
$totalRows = empty($rows) ? 0 : 1;
|
||||
} else if (!empty($parameters['clean_title'])) {
|
||||
$rows = Video::getVideoFromCleanTitle($parameters['clean_title']);
|
||||
$totalRows = empty($rows) ? 0 : 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue