mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +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;
|
||||
|
|
|
@ -22,6 +22,12 @@ if(AVideoPlugin::isEnabledByName('PlayLists')){
|
|||
$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>
|
||||
|
@ -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)) {
|
||||
|
@ -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