<commit_before><?php
class kEdgeCastUrlManager extends kUrlManager
{	
	/**
	 * @param flavorAsset $flavorAsset
	 * @return string
	 */
	public function getFlavorAssetUrl(flavorAsset $flavorAsset)
	{
		$url = parent::getFlavorAssetUrl($flavorAsset);
		$url = ltrim($url,'/');
		$url = preg_replace('/^mp4:(\/)*/', 'mp4:', $url);
		// move version param to "behind" the flavor asset id
		$flavorAssetId = $flavorAsset->getId();
		$flavorIdStr = '/flavorId/'.$flavorAssetId;
		$url = str_replace($flavorIdStr, '', $url);
		$url = str_replace('serveFlavor', 'serveFlavor'.$flavorIdStr, $url);
		
		if ($this->extention) {
			$url .= "/name/$flavorAssetId.$this->extention";
		}
			
		$syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
		$url = $this->addEcSeek($url, $syncKey);			
		return $url;
	}
	
	/**
	 * @param FileSync $fileSync
	 * @return string
	 */
	public function getFileSyncUrl(FileSync $fileSync)
	{
		$url = parent::getFileSyncUrl($fileSync);
		$url = ltrim($url,'/');
		$url = preg_replace('/^mp4:(\/)*/', 'mp4:', $url);
		$syncKey = kFileSyncUtils::getKeyForFileSync($fileSync);
		$url = $this->addEcSeek($url, $syncKey);
		return $url;
	}
	
	
	private function addEcSeek($url, $syncKey)
	{
        if (!empty($this->seekFromTime))
        {
            // remove default seekFrom parameter
            $url = preg_replace('/seekFrom\/-?[0-9]*\/?/', '', $url);
            $url = rtrim($url, '/');<commit_msg>ps: fix for edge cast url manager<commit_after><?php
class kEdgeCastUrlManager extends kUrlManager
{	
	/**
	 * @param flavorAsset $flavorAsset
	 * @return string
	 */
	public function getFlavorAssetUrl(flavorAsset $flavorAsset)
	{
		$url = parent::getFlavorAssetUrl($flavorAsset);
		$url = preg_replace('/^mp4:(\/)*/', 'mp4:', $url);
		// move version param to "behind" the flavor asset id
		$flavorAssetId = $flavorAsset->getId();
		$flavorIdStr = '/flavorId/'.$flavorAssetId;
		$url = str_replace($flavorIdStr, '', $url);
		$url = str_replace('serveFlavor', 'serveFlavor'.$flavorIdStr, $url);
		
		if ($this->protocol == StorageProfile::PLAY_FORMAT_HTTP)
		{
    		if ($this->extention) {
    			$url .= "/name/$flavorAssetId.$this->extention";
    		}
    			
    		$syncKey = $flavorAsset->getSyncKey(flavorAsset::FILE_SYNC_FLAVOR_ASSET_SUB_TYPE_ASSET);
    		$url = $this->addEcSeek($url, $syncKey);
		}			
		return $url;
	}
	
	/**
	 * @param FileSync $fileSync
	 * @return string
	 */
	public function getFileSyncUrl(FileSync $fileSync)
	{
		$url = parent::getFileSyncUrl($fileSync);
		$url = preg_replace('/^mp4:(\/)*/', 'mp4:', $url);
		if ($this->protocol == StorageProfile::PLAY_FORMAT_HTTP)
		{
    		$syncKey = kFileSyncUtils::getKeyForFileSync($fileSync);
    		$url = $this->addEcSeek($url, $syncKey);
		}
		return $url;
	}
	
	
	private function addEcSeek($url, $syncKey)
	{
        if (!empty($this->seekFromTime))
        {
            // remove default seekFrom parameter
            $url = preg_replace('/seekFrom\/-?[0-9]*\/?/', '', $url);
            $url = rtrim($url, '/');
{'fraction_non_alphanumeric': 0.18291884816753926, 'fraction_numerical': 0.003926701570680628, 'mean_word_length': 3.6248108925869893, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4032728', 'n_tokens_mistral': 1180, 'n_tokens_neox': 1111, 'n_words': 192}