diff --git a/composer.json b/composer.json index a5262bd..bf9dcd0 100644 --- a/composer.json +++ b/composer.json @@ -7,15 +7,14 @@ "require": { "smarty/smarty": "~3.1.29", "rg3/youtube-dl": "2016.04.13", - "slim/slim": "~3.4.2", + "slim/slim": "3.x-dev", "mathmarques/smarty-view": "~1.1.0", "symfony/yaml": "~3.0.0", "symfony/process": "~3.0.0", "ptachoire/process-builder-chain": "~1.2.0", "ffmpeg/ffmpeg": "dev-release", "rudloff/smarty-plugin-noscheme": "~0.1.0", - "rudloff/rtmpdump-bin": "~2.3", - "rudloff/psr7-process-stream": "~0.1.0" + "rudloff/rtmpdump-bin": "~2.3" }, "require-dev": { "symfony/var-dumper": "~3.0.0" diff --git a/composer.lock b/composer.lock index 94b927c..e8224f9 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "a030be591c13e040baf3e3ec52716722", - "content-hash": "9ca31c631675ba466325c5a04bff17c1", + "hash": "e173fa909efaf932dcbc99c365645eaf", + "content-hash": "54da2bfd3a8f04d66a1cd4465ec0a261", "packages": [ { "name": "container-interop/container-interop", @@ -48,64 +48,6 @@ ], "type": "library" }, - { - "name": "guzzlehttp/psr7", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/guzzle/psr7.git", - "reference": "31382fef2889136415751badebbd1cb022a4ed72" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/guzzle/psr7/zipball/31382fef2889136415751badebbd1cb022a4ed72", - "reference": "31382fef2889136415751badebbd1cb022a4ed72", - "shasum": "" - }, - "require": { - "php": ">=5.4.0", - "psr/http-message": "~1.0" - }, - "provide": { - "psr/http-message-implementation": "1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0-dev" - } - }, - "autoload": { - "psr-4": { - "GuzzleHttp\\Psr7\\": "src/" - }, - "files": [ - "src/functions_include.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Michael Dowling", - "email": "mtdowling@gmail.com", - "homepage": "https://github.com/mtdowling" - } - ], - "description": "PSR-7 message implementation", - "keywords": [ - "http", - "message", - "stream", - "uri" - ], - "time": "2016-04-13 19:56:01" - }, { "name": "jeremykendall/php-domain-parser", "version": "3.0.0", @@ -466,39 +408,6 @@ }, "type": "library" }, - { - "name": "rudloff/psr7-process-stream", - "version": "0.1.0", - "source": { - "type": "git", - "url": "https://github.com/Rudloff/psr7-process-stream.git", - "reference": "055ecbdadee9b43904aed75d5a548c277cac10a8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Rudloff/psr7-process-stream/zipball/055ecbdadee9b43904aed75d5a548c277cac10a8", - "reference": "055ecbdadee9b43904aed75d5a548c277cac10a8", - "shasum": "" - }, - "require": { - "guzzlehttp/psr7": "~1.3.0" - }, - "require-dev": { - "symfony/var-dumper": "~3.0.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "ProcessStream\\": "classes/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "GPL-3.0" - ], - "description": "PSR-7 stream implementation that can be used to manage processes", - "time": "2016-04-14 10:36:10" - }, { "name": "rudloff/rtmpdump-bin", "version": "2.3", @@ -570,16 +479,16 @@ }, { "name": "slim/slim", - "version": "3.4.2", + "version": "3.x-dev", "source": { "type": "git", "url": "https://github.com/slimphp/Slim.git", - "reference": "a132385f736063d00632b52b3f8a389fe66fe4fa" + "reference": "30cfe3c07dac28ec1129c0577e64b90ba11a54c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slimphp/Slim/zipball/a132385f736063d00632b52b3f8a389fe66fe4fa", - "reference": "a132385f736063d00632b52b3f8a389fe66fe4fa", + "url": "https://api.github.com/repos/slimphp/Slim/zipball/30cfe3c07dac28ec1129c0577e64b90ba11a54c4", + "reference": "30cfe3c07dac28ec1129c0577e64b90ba11a54c4", "shasum": "" }, "require": { @@ -636,7 +545,7 @@ "micro", "router" ], - "time": "2016-05-25 11:23:38" + "time": "2016-05-26 08:20:33" }, { "name": "smarty/smarty", @@ -919,6 +828,7 @@ "aliases": [], "minimum-stability": "stable", "stability-flags": { + "slim/slim": 20, "ffmpeg/ffmpeg": 20 }, "prefer-stable": false, diff --git a/controllers/FrontController.php b/controllers/FrontController.php index 15e00bb..1c8939a 100644 --- a/controllers/FrontController.php +++ b/controllers/FrontController.php @@ -16,7 +16,7 @@ use Alltube\VideoDownload; use Alltube\Config; use Symfony\Component\Process\ProcessBuilder; use Chain\Chain; -use ProcessStream\PopenStream; +use Slim\Http\Stream; /** * Main controller @@ -200,7 +200,7 @@ class FrontController $chain->add('|', $avconvProc); } if ($request->isGet()) { - $response = $response->withBody(new PopenStream($chain->getProcess()->getCommandLine())); + $response = $response->withBody(new Stream(popen($chain->getProcess()->getCommandLine(), 'r'))); } return $response; }