mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-05 19:42:38 +02:00
do not record if is rebroadcasting
This commit is contained in:
parent
06fa3284c8
commit
a8893a5513
7 changed files with 75 additions and 46 deletions
|
@ -10439,6 +10439,11 @@ function getValueOrBlank($array, $default=''){
|
|||
return $text;
|
||||
}
|
||||
|
||||
function getRequestUniqueString(){
|
||||
$text = getValueOrBlank(['app_bundle','ads_app_bundle', 'publisher_app_bundle']);
|
||||
return $text;
|
||||
}
|
||||
|
||||
require_once __DIR__.'/functionSecurity.php';
|
||||
require_once __DIR__.'/functionMySQL.php';
|
||||
require_once __DIR__.'/functionDocker.php';
|
||||
|
|
|
@ -4600,7 +4600,7 @@ if (!class_exists('Video')) {
|
|||
{
|
||||
global $global, $_getVideosPaths;
|
||||
|
||||
$cacheSuffix = "getVideosPaths_" . ($includeS3 ? 1 : 0) . ($_REQUEST['ads_app_bundle']);
|
||||
$cacheSuffix = "getVideosPaths_" . ($includeS3 ? 1 : 0) . getRequestUniqueString();
|
||||
$videoCache = new VideoCacheHandler($filename);
|
||||
$cache = $videoCache->getCache($cacheSuffix, 0);
|
||||
|
||||
|
|
|
@ -821,9 +821,9 @@ class API extends PluginAbstract
|
|||
public function get_api_video($parameters)
|
||||
{
|
||||
$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(), 'requestUniqueString'=>getRequestUniqueString());
|
||||
foreach ($cacheParameters as $value) {
|
||||
$cacheVars[$value] = @$_REQUEST[$value];
|
||||
}
|
||||
|
|
|
@ -2419,6 +2419,13 @@ Click <a href=\"{link}\">here</a> to join our live.";
|
|||
return Playlists_schedules::getDynamicDescription($ps['playlists_schedules']);
|
||||
}
|
||||
}
|
||||
if(AVideoPlugin::isEnabledByName('Rebroadcaster')){
|
||||
$rb = Rebroadcaster::isKeyARebroadcast($key);;
|
||||
if(!empty($rb) && !empty($rb['videos_id'])){
|
||||
$video = new Video('', '', $rb['videos_id']);
|
||||
return $video->getDescription();
|
||||
}
|
||||
}
|
||||
if (empty($description)) {
|
||||
$description = $row['description'];
|
||||
}
|
||||
|
@ -2441,6 +2448,13 @@ Click <a href=\"{link}\">here</a> to join our live.";
|
|||
return Playlists_schedules::getDynamicTitle($ps['playlists_schedules']);
|
||||
}
|
||||
}
|
||||
if(AVideoPlugin::isEnabledByName('Rebroadcaster')){
|
||||
$rb = Rebroadcaster::isKeyARebroadcast($key);;
|
||||
if(!empty($rb) && !empty($rb['videos_id'])){
|
||||
$video = new Video('', '', $rb['videos_id']);
|
||||
return $video->getTitle();
|
||||
}
|
||||
}
|
||||
if (empty($title)) {
|
||||
$title = $row['title'];
|
||||
}
|
||||
|
|
|
@ -295,6 +295,13 @@ class LiveTransmition extends ObjectYPT {
|
|||
$row['title'] = Playlists_schedules::getDynamicTitle($row['title']);
|
||||
}
|
||||
}
|
||||
if(AVideoPlugin::isEnabledByName('Rebroadcaster')){
|
||||
$rb = Rebroadcaster::isKeyARebroadcast($key);;
|
||||
if(!empty($rb) && !empty($rb['videos_id'])){
|
||||
$video = new Video('', '', $rb['videos_id']);
|
||||
$row['title'] = $video->getTitle();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$row = false;
|
||||
|
|
|
@ -16,16 +16,22 @@ $islive = getLiveKey();
|
|||
$liveStreamObject = new LiveStreamObject($islive['key'], $islive['live_servers_id'], @$_REQUEST['live_index'], 0);
|
||||
$key = $liveStreamObject->getKeyWithIndex(true);
|
||||
|
||||
if(AVideoPlugin::isEnabledByName('PlayLists')){
|
||||
if (AVideoPlugin::isEnabledByName('PlayLists')) {
|
||||
$ps = Playlists_schedules::iskeyPlayListScheduled($key);
|
||||
if(!empty($ps)){
|
||||
if (!empty($ps)) {
|
||||
$key = $ps['cleankey'];
|
||||
}
|
||||
}
|
||||
if (AVideoPlugin::isEnabledByName('Rebroadcaster')) {
|
||||
$rb = Rebroadcaster::isKeyARebroadcast($key);;
|
||||
if (!empty($rb) && !empty($rb['videos_id'])) {
|
||||
$key = $rb['cleankey'];
|
||||
}
|
||||
}
|
||||
//var_dump(getLiveKey(), $islive, $key);exit;
|
||||
?>
|
||||
<style>
|
||||
#streamkey{
|
||||
#streamkey {
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
@ -78,21 +84,21 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
</div>
|
||||
<div class="tabbable-line <?php echo getCSSAnimationClassAndStyle('animate__fadeInLeft', 'live'); ?>">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active" >
|
||||
<li class="active">
|
||||
<a data-toggle="tab" href="#tabStreamMetaData"><i class="fas fa-key"></i> <?php echo __("Stream Meta Data"); ?></a>
|
||||
</li>
|
||||
<li class="">
|
||||
<?php
|
||||
$url = "{$global['webSiteRootURL']}plugin/Live/view/Live_schedule/uploadPoster.php";
|
||||
$url = addQueryStringParameter($url,'live_schedule_id',@$_REQUEST['live_schedule_id']);
|
||||
$url = addQueryStringParameter($url,'live_servers_id',@$_REQUEST['live_servers_id']);
|
||||
$url = addQueryStringParameter($url, 'live_schedule_id', @$_REQUEST['live_schedule_id']);
|
||||
$url = addQueryStringParameter($url, 'live_servers_id', @$_REQUEST['live_servers_id']);
|
||||
?>
|
||||
<a style="cursor: pointer;" onclick="avideoModalIframe('<?php echo $url; ?>');"><i class="fas fa-images"></i> <?php echo __("Poster Image"); ?></a>
|
||||
</li>
|
||||
<?php
|
||||
if (empty($objLive->hideUserGroups)) {
|
||||
?>
|
||||
<li class="" >
|
||||
<li class="">
|
||||
<a data-toggle="tab" href="#tabUserGroups"><i class="fas fa-users"></i> <?php echo __("User Groups"); ?></a>
|
||||
</li>
|
||||
<?php
|
||||
|
@ -121,14 +127,14 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
<?php
|
||||
if (!empty($objLive->hidePublicListedOption)) {
|
||||
?>
|
||||
<input id="listed" type="hidden" value="1"/>
|
||||
<input id="listed" type="hidden" value="1" />
|
||||
<?php
|
||||
} else {
|
||||
?>
|
||||
<div class="form-group">
|
||||
<span class="fa fa-globe"></span> <?php echo __("Make Stream Publicly Listed"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="listed" type="checkbox" value="1" <?php echo!empty($trasnmition['public']) ? "checked" : ""; ?> onchange="saveStream();"/>
|
||||
<input id="listed" type="checkbox" value="1" <?php echo !empty($trasnmition['public']) ? "checked" : ""; ?> onchange="saveStream();" />
|
||||
<label for="listed" class="label-success"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -140,7 +146,8 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
if (
|
||||
$SendRecordedToEncoderObjectData &&
|
||||
$SendRecordedToEncoderClassExists &&
|
||||
$SendRecordedToEncoderMethodExists) {
|
||||
$SendRecordedToEncoderMethodExists
|
||||
) {
|
||||
$SendRecordedToEncoderCanAutoRecord = SendRecordedToEncoder::canAutoRecord(User::getId());
|
||||
$SendRecordedToEncoderCanApprove = SendRecordedToEncoder::canApprove(User::getId());
|
||||
if ($SendRecordedToEncoderCanAutoRecord || ($SendRecordedToEncoderCanApprove && $SendRecordedToEncoderObjectData->usersCanSelectAutoRecord)) {
|
||||
|
@ -148,7 +155,7 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
<div class="form-group">
|
||||
<span class="fa fa-globe"></span> <?php echo __("Auto record this live"); ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="recordLive" type="checkbox" value="1" <?php echo SendRecordedToEncoder::userApproved(User::getId()) ? "checked" : ""; ?> onchange="saveStream();"/>
|
||||
<input id="recordLive" type="checkbox" value="1" <?php echo SendRecordedToEncoder::userApproved(User::getId()) ? "checked" : ""; ?> onchange="saveStream();" />
|
||||
<label for="recordLive" class="label-success"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -199,7 +206,7 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
<div class="form-group">
|
||||
<span class="fa fa-users"></span> <?php echo $value['group_name']; ?>
|
||||
<div class="material-switch pull-right">
|
||||
<input id="group<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="userGroups" <?php echo(in_array($value['id'], $groups) ? "checked" : "") ?>/>
|
||||
<input id="group<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="userGroups" <?php echo (in_array($value['id'], $groups) ? "checked" : "") ?> />
|
||||
<label for="group<?php echo $value['id']; ?>" class="label-success"></label>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -215,6 +222,3 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,7 +2,6 @@
|
|||
header('Content-Type: application/json');
|
||||
require_once '../../../../videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'plugin/PlayLists/Objects/Playlists_schedules.php';
|
||||
|
||||
$obj = new stdClass();
|
||||
$obj->error = true;
|
||||
$obj->msg = "";
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue