Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert auto archive (WEBC-1574) #9044

Merged
merged 1 commit into from Dec 19, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
20 changes: 0 additions & 20 deletions alpha/lib/data/live/kLiveEntryRecordingOptions.php
Expand Up @@ -29,11 +29,6 @@ class kLiveEntryRecordingOptions
*/
protected $shouldMakeHidden = false;

/**
* @var boolean
*/
protected $shouldAutoArchive = false;

/**
* @return the $shouldCopyThumbnail
*/
Expand Down Expand Up @@ -96,19 +91,4 @@ public function getShouldMakeHidden()
return $this->shouldMakeHidden;
}

/**
* @param boolean $shouldAutoArchive
*/
public function setShouldAutoArchive($shouldAutoArchive)
{
$this->shouldAutoArchive = $shouldAutoArchive;
}

/**
* @return boolean
*/
public function getShouldAutoArchive()
{
return $this->shouldAutoArchive;
}
}
Expand Up @@ -28,18 +28,12 @@ class KalturaLiveEntryRecordingOptions extends KalturaObject
*/
public $shouldMakeHidden;

/**
* @var KalturaNullableBoolean
*/
public $shouldAutoArchive;

private static $mapBetweenObjects = array
(
"shouldCopyEntitlement",
"shouldCopyScheduling",
"shouldCopyThumbnail",
"shouldMakeHidden",
"shouldAutoArchive"
);

/* (non-PHPdoc)
Expand Down
94 changes: 0 additions & 94 deletions api_v3/services/LiveStreamService.php
Expand Up @@ -577,98 +577,4 @@ public function regenerateStreamTokenAction($entryId)

}

/**
* Archive a live entry which was recorded
*
* @action archive
* @param string $liveEntryId
* @return bool
* @throws KalturaAPIException
* @throws PropelException
*/
public function archiveAction($liveEntryId)
{
$liveEntry = entryPeer::retrieveByPK($liveEntryId);
/** @var LiveStreamEntry $liveEntry */
if (!$liveEntry)
{
KalturaLog::err("Live entry id [" . $liveEntryId . "] not found");
throw new KalturaAPIException(KalturaErrors::ENTRY_ID_NOT_FOUND, $liveEntryId);
}
$cuePoints = CuePointPeer::retrieveByEntryId($liveEntryId);

$notDeletedCuePointTags = ["entry-reset-mode", "webcast:internal-state", "player-qna-settings-update",
"select-deck-document", "poll-data", "timeline-assets-state", "rtc-settings"];

foreach ($cuePoints as $cuePoint)
{
/** @var CuePoint $cuePoint */
KalturaLog::info("Iterating over cue point [" . $cuePoint->getId() . "]");
$cuePointTags = explode(',', $cuePoint->getTags());
$containsImportantTag = false;
foreach ($notDeletedCuePointTags as $importantCuePointTag)
{
if (in_array($importantCuePointTag, $cuePointTags))
{
$containsImportantTag = true;
break;
}
}
if (!$containsImportantTag)
{
$cuePoint->setStatus(CuePointStatus::DELETED);
$cuePoint->save();
}
}

$vodEntry = entryPeer::retrieveByPK($liveEntry->getRecordedEntryId());
if (!$vodEntry)
{
KalturaLog::warning("Recorded entry id [" . $liveEntry->getRecordedEntryId() . "] not found");
}
else {
$currentDate = date("M-d-Y H:i");
$vodEntry->setName($liveEntry->getName() . " " . $currentDate);
$vodEntry->setDescription($liveEntry->getDescription());
$vodEntry->setTags($liveEntry->getTags());
$vodEntry->setDisplayInSearch(1);
$vodEntry->save();
}

$liveEntry->setRecordedEntryId(null);
$liveEntry->setRedirectEntryId(null);
$liveEntry->save();

$pushNotificationPlugin = KalturaPluginManager::getPluginInstance(PushNotificationPlugin::getPluginName());

if ($pushNotificationPlugin)
{
$liveEntryString = new KalturaStringValue();
$liveEntryString->value = $liveEntryId;
$pushNotificationParameter = new KalturaPushEventNotificationParameter();
$pushNotificationParameter->key = "entryId";
$pushNotificationParameter->value = $liveEntryString;
$pushEventNotificationParameterArray = new KalturaPushEventNotificationParameterArray();
$pushEventNotificationParameterArray[] = $pushNotificationParameter;
$pushNotificationParams = new KalturaPushNotificationParams();
$pushNotificationParams->userParams = $pushEventNotificationParameterArray;

$pushNotificationTemplateService = new PushNotificationTemplateService();
$pushNotificationTemplateService->initService("pushnotification_pushnotificationtemplate",
"eventNotificationTemplate", "sendCommand");

$pushNotificationTemplateService->sendCommandAction('POLLS_PUSH_NOTIFICATIONS',
$pushNotificationParams, KalturaPushNotificationCommandType::CLEAR_QUEUE);
$pushNotificationTemplateService->sendCommandAction('PUBLIC_QNA_NOTIFICATIONS',
$pushNotificationParams, KalturaPushNotificationCommandType::CLEAR_QUEUE);
$pushNotificationTemplateService->sendCommandAction('USER_QNA_NOTIFICATIONS',
$pushNotificationParams, KalturaPushNotificationCommandType::CLEAR_QUEUE);
}
else
{
KalturaLog::info("Plugin [" . PushNotificationPlugin::getPluginName() . "] is not loaded");
return false;
}
return true;
}
}
18 changes: 1 addition & 17 deletions batch/batches/LiveToVod/KAsyncLiveToVod.class.php
Expand Up @@ -37,23 +37,7 @@ protected function getJobType()
*/
protected function exec(KalturaBatchJob $job)
{
$jobRes = $this->copyCuePoint($job, $job->data);
try {
$liveEntryId = $job->data->liveEntryId;
$liveEntry = KBatchBase::$kClient->baseEntry->get($liveEntryId);
/** @var KalturaLiveStreamEntry $liveEntry */
$recordStatus = $liveEntry->recordingStatus;
$shouldAutoArchive = $liveEntry->recordingOptions->shouldAutoArchive;
if ($recordStatus == KalturaRecordStatus::PER_SESSION && $shouldAutoArchive == KalturaNullableBoolean::TRUE_VALUE) {
KBatchBase::$kClient->liveStream->archive($liveEntryId);
}
}
catch (Exception $e)
{
KalturaLog::err($e->getMessage());
}

return $jobRes;
return $this->copyCuePoint($job, $job->data);
}

/**
Expand Down
9 changes: 0 additions & 9 deletions deployment/permissions/service.livestream.ini
Expand Up @@ -130,12 +130,3 @@ permissionItem19.service = livestream
permissionItem19.action = createRecordedEntry
permissionItem19.partnerId = 0
permissionItem19.permissions = -5>MEDIA_SERVER_BASE, -5>PARTNER_-5_GROUP_*_PERMISSION,MEDIA_SERVER_PARTNER_LEVEL

permissionItem20.service = livestream
permissionItem20.action = archive
permissionItem20.partnerId = -1
permissionItem20.param3 =
permissionItem20.param4 =
permissionItem20.param5 =
permissionItem20.tags =
permissionItem20.permissions = BATCH_BASE, PARTNER_-1_GROUP_*_PERMISSION
Expand Up @@ -8,8 +8,3 @@ permissionItem12.service = pushnotification_pushnotificationtemplate
permissionItem12.action = sendCommand
permissionItem12.partnerId = 0
permissionItem12.permissions = WEBCAST_PRODUCER_PERMISSION

permissionItem13.service = pushnotification_pushnotificationtemplate
permissionItem13.action = sendCommand
permissionItem13.partnerId = -1
permissionItem13.permissions = BATCH_BASE, PARTNER_-1_GROUP_*_PERMISSION

This file was deleted.

11 changes: 0 additions & 11 deletions release-notes.md
Expand Up @@ -68,17 +68,6 @@
php /opt/kaltura/app/deployment/base/scripts/populateSphinxCategories.php


## Enabling auto archive when using live with recording ##
- Issue Type: Task
- Issue ID : WEBC-1574

### Configuration ##
none.

#### Deployment Scripts ####
Run 'php /opt/kaltura/app/deployment/updates/scripts/2019_12_10_update_archive_permissions.php'


## Reach boolean event notification for privacy context ##
- Issue Type: Task
- Issue ID : REACH2-737
Expand Down