Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Liron Shpinerman authored and Liron Shpinerman committed Apr 5, 2017
1 parent eecf8b9 commit cfdcd34
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,7 @@ protected function getDownloadFileName()
private function serveVodEntry()
{
$this->initFlavorIds();

if($this->entry->getPartner()->getForceCdnHost())
$this->cdnHost = myPartnerUtils::getCdnHost($this->entry->getPartnerId(), $this->protocol);

Expand Down Expand Up @@ -1068,6 +1069,8 @@ private function setParamsForPlayServer($usePlayServer)
$this->deliveryAttributes->setUiConfId($this->getRequestParameter("uiConfId"));
if(!$this->deliveryAttributes->getUiConfId())
$this->deliveryAttributes->setUiConfId($this->getRequestParameter("uiconf"));
if($this->getRequestParameter("sessionId"))
$this->deliveryAttributes->setSessionId($this->getRequestParameter("sessionId"));
}
}

Expand All @@ -1090,14 +1093,15 @@ public function execute()
$this->deliveryAttributes->setMediaProtocol($this->getRequestParameter ( "protocol", null ));
if(!$this->deliveryAttributes->getMediaProtocol() || $this->deliveryAttributes->getMediaProtocol() === "null")
$this->deliveryAttributes->setMediaProtocol(PlaybackProtocol::HTTP);

$this->deliveryAttributes->setFormat($this->getRequestParameter ( "format" ));
if(!$this->deliveryAttributes->getFormat())
$this->deliveryAttributes->setFormat(PlaybackProtocol::HTTP);

if ($this->deliveryAttributes->getFormat() == PlaybackProtocol::AKAMAI_HDS || $this->deliveryAttributes->getFormat() == self::HDNETWORKSMIL)
if(strpos($this->deliveryAttributes->getMediaProtocol(), "http") !== 0)
$this->deliveryAttributes->setMediaProtocol(PlaybackProtocol::HTTP);

$tags = $this->getRequestParameter ( "tags", null );
if (!$tags)
{
Expand All @@ -1114,13 +1118,15 @@ public function execute()

$this->deliveryAttributes->setTags($tags);
}

$this->deliveryAttributes->setpreferredBitrate($this->getRequestParameter ( "preferredBitrate", null ));
$this->maxBitrate = $this->getRequestParameter ( "maxBitrate", null );
if(($this->maxBitrate) && ((!is_numeric($this->maxBitrate)) || ($this->maxBitrate <= 0)))
KExternalErrors::dieError(KExternalErrors::INVALID_MAX_BITRATE);

$this->deliveryAttributes->setStorageId($this->getRequestParameter ( "storageId", null ));
$this->cdnHost = $this->getRequestParameter ( "cdnHost", null );

$this->deliveryAttributes->setResponseFormat($this->getRequestParameter ( "responseFormat", null ));

$this->deliveryProfileId = $this->getRequestParameter( "deliveryProfileId", null );
Expand Down

0 comments on commit cfdcd34

Please sign in to comment.