Skip to content

Commit

Permalink
Merge pull request kaltura#1350 from kaltura/IX-9.18.0-url-managers-p…
Browse files Browse the repository at this point in the history
…hase-2

Some hot-fixes that were merged to IX-9.17.0.
  • Loading branch information
sharonadar committed Jun 18, 2014
2 parents 94f3a34 + bb3711a commit 06407fa
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,9 @@ private function serveHDNetwork()
private function getLiveEntryBaseUrls()
{
$tag = null;
if(count($this->deliveryAttributes->getTags()) == 1) {
$tags = $this->deliveryAttributes->getTags();
$tags = $this->deliveryAttributes->getTags();
if(count($tags) == 1)
$tag = reset($tags);
}

$protocol = $this->deliveryAttributes->getMediaProtocol();
if(in_array($this->deliveryAttributes->getFormat(), self::$httpFormats) && !in_array($protocol, self::$httpProtocols))
Expand Down Expand Up @@ -953,5 +952,4 @@ public function execute()
KExternalErrors::terminateDispatch();
$renderer->output($deliveryCode, $playbackContext);
}

}
17 changes: 9 additions & 8 deletions alpha/lib/model/DeliveryProfilePeer.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ public static function getDeliveryByPartner(Partner $partner, $streamerType = Pl

$delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol);
if($delivery) {
KalturaLog::debug('Delivery ID for partnerId: '. $partnerId . ' and streamer type: ' . $streamerType . ' is ' . $delivery->getId());
KalturaLog::debug("Delivery ID for partnerId [$partnerId] and streamer type [$streamerType] is " . $delivery->getId());
} else {
KalturaLog::err('Delivery ID can\'t be determined for partnerId: '. $partnerId . ' ,streamer type: ' . $streamerType . " and media protocol : " . $mediaProtocol);
KalturaLog::err("Delivery ID can't be determined for partnerId [$partnerId] streamer type [$streamerType] and media protocol [$mediaProtocol]");
}
return $delivery;
}
Expand Down Expand Up @@ -243,20 +243,20 @@ public static function getRemoteDeliveryByStorageId($storageProfileId, $entryId,

$deliveryIds = $storageProfile->getDeliveryProfileIds();
if(!array_key_exists($streamerType, $deliveryIds)) {
KalturaLog::err('Delivery ID can\'t be determined for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) and streamer type: ' . $streamerType);
KalturaLog::err("Delivery ID can't be determined for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) and streamer type [ $streamerType ]");
return null;
}

$deliveries = DeliveryProfilePeer::retrieveByPKs($deliveryIds[$streamerType]);
$delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol);
if($delivery) {
KalturaLog::debug('Delivery ID for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) and streamer type:' . $streamerType . ' is ' . $delivery->getId());
KalturaLog::debug("Delivery ID for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) and streamer type [$streamerType] is " . $delivery->getId());
$delivery->setEntryId($entryId);
$delivery->setStorageProfileId($storageProfileId);

$delivery->initDeliveryDynamicAttributes($fileSync, $asset);
} else {
KalturaLog::err('Delivery ID can\'t be determined for storageId: '. $storageProfileId . '( PartnerId:' . $storageProfile->getPartnerId() . ' ) ,streamer type: ' . $streamerType . " and media protocol : " . $mediaProtocol);
KalturaLog::err("Delivery ID can't be determined for storageId [$storageProfileId] ( PartnerId [" . $storageProfile->getPartnerId() . "] ) streamer type [$streamerType] and media protocol [$mediaProtocol]");
}

return $delivery;
Expand Down Expand Up @@ -317,10 +317,10 @@ public static function getLiveDeliveryProfileByHostName($cdnHost, $entryId, $str
$deliveries = self::doSelect($c);
$delivery = self::selectByMediaProtocol($deliveries, $mediaProtocol);
if($delivery) {
KalturaLog::debug('Delivery ID for Host Name: '. $cdnHost . ' and streamer type: ' . $streamerType . ' is ' . $delivery->getId());
KalturaLog::debug("Delivery ID for Host Name: [$cdnHost] and streamer type: [$streamerType] is [" . $delivery->getId());
$delivery->setEntryId($entryId);
} else {
KalturaLog::err('Delivery ID can\'t be determined for Host Name: '. $cdnHost . ' and streamer type: ' . $streamerType);
KalturaLog::err("Delivery ID can't be determined for Host Name [$cdnHost] and streamer type [$streamerType]");
}
return $delivery;

Expand Down Expand Up @@ -374,9 +374,10 @@ protected static function getAllLiveDeliveryProfileTypes()
$deliveryProfileTypes = array_merge($deliveryProfileTypes, self::$LIVE_DELIVERY_PROFILES);
return $deliveryProfileTypes;
}

public static function getCacheInvalidationKeys()
{
return array(array("deliveryProfile:id=%s", self::ID), array("deliveryProfile:partnerId=%s", self::PARTNER_ID));
return array(array("deliveryProfile:id=%s", self::ID), array("deliveryProfile:partnerId=%s", self::PARTNER_ID));
}
} // DeliveryProfilePeer

0 comments on commit 06407fa

Please sign in to comment.