From b4d3b9d88b64ab3224accb281daa77e00145aee3 Mon Sep 17 00:00:00 2001 From: Pierre Rudloff Date: Fri, 14 Oct 2016 19:16:52 +0200 Subject: [PATCH] Duplicate code --- classes/VideoDownload.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/classes/VideoDownload.php b/classes/VideoDownload.php index a4c589d..ddc1fa3 100644 --- a/classes/VideoDownload.php +++ b/classes/VideoDownload.php @@ -255,12 +255,12 @@ class VideoDownload ); if (parse_url($video->url, PHP_URL_SCHEME) == 'rtmp') { - $chain = new Chain($this->getRtmpProcess($video)); - $chain->add('|', $avconvProc); + $process = $this->getRtmpProcess($video); } else { - $chain = new Chain($this->getCurlProcess($video)); - $chain->add('|', $avconvProc); + $process = $this->getCurlProcess($video); } + $chain = new Chain($process); + $chain->add('|', $avconvProc); return popen($chain->getProcess()->getCommandLine(), 'r'); }