1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
This commit is contained in:
Daniel Neto 2024-01-04 14:33:04 -03:00
parent de933fd538
commit 1e4c0a270c
3 changed files with 20 additions and 17 deletions

View file

@ -1,3 +1,4 @@
{ {
"git.ignoreLimitWarning": true "git.ignoreLimitWarning": true,
"search.useIgnoreFiles": false
} }

View file

@ -2864,7 +2864,8 @@ if (!class_exists('Video')) {
return true; return true;
} }
function deleteFromTables($videos_id) { function deleteFromTables($videos_id)
{
$tables = array('vast_campaigns_has_videos', 'RebroadcasterSchedule'); $tables = array('vast_campaigns_has_videos', 'RebroadcasterSchedule');
foreach ($tables as $table) { foreach ($tables as $table) {
if (ObjectYPT::isTableInstalled($table)) { if (ObjectYPT::isTableInstalled($table)) {
@ -4599,7 +4600,7 @@ if (!class_exists('Video')) {
{ {
global $global, $_getVideosPaths; global $global, $_getVideosPaths;
$cacheSuffix = "getVideosPaths_" . ($includeS3 ? 1 : 0); $cacheSuffix = "getVideosPaths_" . ($includeS3 ? 1 : 0) . ($_REQUEST['ads_app_bundle']);
$videoCache = new VideoCacheHandler($filename); $videoCache = new VideoCacheHandler($filename);
$cache = $videoCache->getCache($cacheSuffix, 0); $cache = $videoCache->getCache($cacheSuffix, 0);
@ -4607,7 +4608,9 @@ if (!class_exists('Video')) {
//$cache = ObjectYPT::getCache($cacheName, 0); //$cache = ObjectYPT::getCache($cacheName, 0);
//var_dump($cacheName, $cache, _json_decode($cache));//exit; //var_dump($cacheName, $cache, _json_decode($cache));//exit;
if (!empty($cache)) { if (!empty($cache)) {
return object_to_array(_json_decode($cache)); $obj = object_to_array(_json_decode($cache));
//var_dump($obj);exit;
return $obj;
} }
$types = ['', '_Low', '_SD', '_HD']; $types = ['', '_Low', '_SD', '_HD'];

View file

@ -821,8 +821,7 @@ class API extends PluginAbstract
public function get_api_video($parameters) public function get_api_video($parameters)
{ {
$start = microtime(true); $start = microtime(true);
$cacheParameters = array('noRelated', 'APIName', 'catName', 'rowCount', 'APISecret', 'sort', 'searchPhrase', 'current', 'tags_id', 'channelName', 'videoType', 'is_serie', 'user', 'videos_id', 'playlist', 'ads_app_bundle');
$cacheParameters = array('noRelated', 'APIName', 'catName', 'rowCount', 'APISecret', 'sort', 'searchPhrase', 'current', 'tags_id', 'channelName', 'videoType', 'is_serie', 'user', 'videos_id', 'playlist');
$cacheVars = array('users_id' => User::getId()); $cacheVars = array('users_id' => User::getId());
foreach ($cacheParameters as $value) { foreach ($cacheParameters as $value) {