mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
This commit is contained in:
parent
09d3d17648
commit
1e11a70121
1 changed files with 27 additions and 0 deletions
|
@ -208,6 +208,33 @@ class API extends PluginAbstract {
|
||||||
$obj->rows = $rows;
|
$obj->rows = $rows;
|
||||||
return new ApiObject("", false, $obj);
|
return new ApiObject("", false, $obj);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param type $parameters
|
||||||
|
* ['APISecret' to list all videos]
|
||||||
|
* ['searchPhrase' to search on the categories]
|
||||||
|
* ['tags_id' the ID of the tag you want to filter]
|
||||||
|
* ['catName' the clean_APIName of the category you want to filter]
|
||||||
|
* ['channelName' the channelName of the videos you want to filter]
|
||||||
|
* @example {webSiteRootURL}plugin/API/{getOrSet}.json.php?APIName={APIName}
|
||||||
|
* @return \ApiObject
|
||||||
|
*/
|
||||||
|
public function get_api_videosCount($parameters) {
|
||||||
|
global $global;
|
||||||
|
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||||
|
$obj = $this->startResponseObject($parameters);
|
||||||
|
$dataObj = $this->getDataObject();
|
||||||
|
if ($dataObj->APISecret === @$_GET['APISecret']) {
|
||||||
|
$totalRows = Video::getTotalVideos("viewable", false, true);
|
||||||
|
} else {
|
||||||
|
$totalRows = Video::getTotalVideos();
|
||||||
|
}
|
||||||
|
$objMob = YouPHPTubePlugin::getObjectData("MobileManager");
|
||||||
|
$SubtitleSwitcher = YouPHPTubePlugin::loadPluginIfEnabled("SubtitleSwitcher");
|
||||||
|
$obj->totalRows = $totalRows;
|
||||||
|
return new ApiObject("", false, $obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param type $parameters
|
* @param type $parameters
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue