Skip to content

Commit

Permalink
https://github.com/WWBN/AVideo/issues/6772
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel committed Jun 22, 2022
1 parent f79509b commit a22ac8d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions objects/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -7067,17 +7067,20 @@ function getLiveVideosFromCategory($categories_id) {

function getStatsNotifications($force_recreate = false, $listItIfIsAdminOrOwner = true) {
global $__getStatsNotifications__;
$isLiveEnabled = AVideoPlugin::isEnabledByName('Live');
$cacheName = "getStats" . DIRECTORY_SEPARATOR . "getStatsNotifications";
unset($_POST['sort']);
if ($force_recreate) {
Live::deleteStatsCache();
if($isLiveEnabled){
Live::deleteStatsCache();
}
} else {
if (!empty($__getStatsNotifications__)) {
return $__getStatsNotifications__;
}
$json = ObjectYPT::getCache($cacheName, 0, true);
}
if (AVideoPlugin::isEnabledByName('Live') && (empty($json) || !empty($json->error) || !isset($json->error)) ){
if ($isLiveEnabled && (empty($json) || !empty($json->error) || !isset($json->error))) {
//_error_log('getStatsNotifications: 1 ' . json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)));
$json = Live::getStats();
$json = object_to_array($json);
Expand Down

0 comments on commit a22ac8d

Please sign in to comment.