Merge branch 'develop' into feature/stream
This commit is contained in:
commit
5c4caf359f
1 changed files with 20 additions and 0 deletions
|
@ -12,7 +12,18 @@ use Symfony\Component\Process\ProcessBuilder;
|
||||||
*/
|
*/
|
||||||
class VideoDownload
|
class VideoDownload
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* Config instance.
|
||||||
|
*
|
||||||
|
* @var Config
|
||||||
|
*/
|
||||||
private $config;
|
private $config;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ProcessBuilder instance used to call Python.
|
||||||
|
*
|
||||||
|
* @var ProcessBuilder
|
||||||
|
*/
|
||||||
private $procBuilder;
|
private $procBuilder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -48,6 +59,15 @@ class VideoDownload
|
||||||
return explode(PHP_EOL, trim($process->getOutput()));
|
return explode(PHP_EOL, trim($process->getOutput()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get a property from youtube-dl.
|
||||||
|
*
|
||||||
|
* @param string $url URL to parse
|
||||||
|
* @param string $format Format
|
||||||
|
* @param string $prop Property
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
private function getProp($url, $format = null, $prop = 'dump-json')
|
private function getProp($url, $format = null, $prop = 'dump-json')
|
||||||
{
|
{
|
||||||
$this->procBuilder->setArguments(
|
$this->procBuilder->setArguments(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue