Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel Neto committed Jan 17, 2025
1 parent 9703725 commit 4526113
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
21 changes: 8 additions & 13 deletions plugin/Live/Live.php
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,8 @@ public function getStatsObject($live_servers_id = 0, $force_recreate = false, $t
{
global $global, $_getStatsObject_force_recreate_executed;

if ($force_recreate) {
if (!empty($_getStatsObject_force_recreate_executed)) {
if($force_recreate){
if(!empty($_getStatsObject_force_recreate_executed)){
// already forced, ignore it
$force_recreate = false;
}
Expand Down Expand Up @@ -1332,9 +1332,9 @@ public function getStatsObject($live_servers_id = 0, $force_recreate = false, $t
$xml = $this->createCacheStatsObject($live_servers_id, $o->requestStatsTimout);
$getStatsObject[$live_servers_id] = $xml;
$cacheHandler->setCache($xml);

if (!empty($force_recreate) || !empty($_REQUEST['debug'])) {
_error_log("Live::getStatsObject[$live_servers_id] 5: forced to be recreated done " . json_encode(debug_backtrace()));
_error_log("Live::getStatsObject[$live_servers_id] 5: forced to be recreated done ".json_encode(debug_backtrace()));
}
//var_dump(__LINE__, $xml);
$global['isStatsAccessible'][$live_servers_id] = !empty($xml);
Expand Down Expand Up @@ -1989,12 +1989,7 @@ public static function isRebroadcast($key)
$_isRebroadcast = array();
}
if (!isset($_isRebroadcast[$key])) {
$parts = explode("_", $key);
if (empty($parts[0])) {
return false;
}
$livet = LiveTransmition::keyExists($parts[0]);
$lt = new LiveTransmition($livet['id']);
$lt = self::getLiveTransmitionObjectFromKey($key);
if (empty($lt)) {
$_isRebroadcast[$key] = false;
} else {
Expand Down Expand Up @@ -3673,7 +3668,7 @@ public static function getValidNotOnlineLiveIndex($key, $live_index)
if (empty($live_index)) {
return 1;
}
if (AVideoPlugin::isEnabled('VideoPlaylistScheduler') && VideoPlaylistScheduler::iskeyShowScheduled("$key-$live_index")) {
if(AVideoPlugin::isEnabled('VideoPlaylistScheduler') && VideoPlaylistScheduler::iskeyShowScheduled("$key-$live_index")){
// it is a VideoPlaylistScheduler do not change it
return $live_index;
}
Expand Down Expand Up @@ -4154,7 +4149,7 @@ public static function _getUserNotificationButton()
{
$obj = AVideoPlugin::getDataObject('Live');
if (Live::canScheduleLive()) {
?>
?>
<button class="btn btn-primary btn-sm" onclick="avideoModalIframeFull(webSiteRootURL + 'plugin/Live/view/Live_schedule/panelIndex.php');" data-toggle="tooltip" title="<?php echo __('Schedule') ?>">
<i class="far fa-calendar"></i> <span class="hidden-sm hidden-xs"><?php echo __('Schedule'); ?></span>
</button>
Expand Down Expand Up @@ -4223,7 +4218,7 @@ public function on_publish_done($live_transmitions_history_id, $users_id, $key,
$obj->live_key = $key;
$obj->live_servers_id = intval($live_servers_id);
$obj->sendSocketMessage = sendSocketMessage(array('redirectLive' => $obj), 'redirectLive', 0);
_error_log('on_publish_done::redirectLive ' . json_encode($obj));
_error_log('on_publish_done::redirectLive '.json_encode($obj));
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions plugin/Live/Objects/Live_schedule.php
Original file line number Diff line number Diff line change
Expand Up @@ -579,4 +579,10 @@ public function isAPrivateLive(){
return !empty($lt->getGroups());
}

public function getIsRebroadcast() {
$ltRow = LiveTransmition::getFromDbByUser($this->getUsers_id());
$lt = new LiveTransmition($ltRow['id']);
return !empty($lt->getIsRebroadcast());
}

}

0 comments on commit 4526113

Please sign in to comment.