Permalink
Browse files

orignal file commited

  • Loading branch information...
MarwanDesigner committed Jul 26, 2017
1 parent ad458c8 commit b5ed1aa89521050f8d825bb23b6385642bb5410f
Showing with 6 additions and 47 deletions.
  1. +1 −1 .htaccess
  2. +5 −1 src/Format.php
  3. +0 −45 src/VideoInfo.php
View
@@ -1,3 +1,3 @@
# intercept request for getvideo
RewriteEngine On
RewriteRule ^.*\.mp4$ getvideo.php
RewriteRule ^.*\.mp4$ getvideo.php
View
@@ -105,7 +105,11 @@ private function parseUrl()
{
// TODO: Remove signature decipher from Format
$playerID = SignatureDecipher::downloadPlayerScript($this->getVideoId());
$signature = '&ratebypass=yes&signature='.SignatureDecipher::decipherSignature($playerID, $this->raw_data['s']);
if(strpos($this->raw_data['url'], 'ratebypass=')===false)
{
$this->raw_data['url'] .= '&ratebypass=yes';
}
$signature = '&signature='.SignatureDecipher::decipherSignature($playerID, $this->raw_data['s']);
}
$this->data['url'] = $this->raw_data['url'].$signature;
View
@@ -141,23 +141,6 @@ public static function createFromStringWithConfig($string, Config $config)
return new self($video_info, $config);
}
/**
* Creates a VideoInfo from string
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::createFromStringWithConfig() instead
*
* @param string $video_info
* @return VideoInfo
*/
public static function createFromString($string)
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::createFromStringWithConfig() instead', E_USER_DEPRECATED);
parse_str($string, $video_info);
return new self($video_info);
}
/**
* @var Format[]
*/
@@ -340,32 +323,4 @@ public function getAdaptiveFormats()
{
return $this->adaptive_formats;
}
/**
* Get the url_encoded_fmt_stream_map
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getFormats() instead
*
* @return string
*/
public function getStreamMapString()
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getFormats() instead', E_USER_DEPRECATED);
return $this->data['url_encoded_fmt_stream_map'];
}
/**
* Get the adaptive_fmts
*
* @deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getAdaptiveFormats() instead
*
* @return string
*/
public function getAdaptiveFormatsString()
{
@trigger_error(__METHOD__ . ' is deprecated since version 0.2, to be removed in 0.3. Use VideoInfo::getAdaptiveFormats() instead', E_USER_DEPRECATED);
return $this->data['adaptive_fmts'];
}
}

0 comments on commit b5ed1aa

Please sign in to comment.