Log youtube-dl and ffmpeg commands (fixes #297)

This commit is contained in:
Pierre Rudloff 2020-07-15 22:39:46 +02:00
parent 7e575e1bb2
commit 96a75cbf14
6 changed files with 359 additions and 310 deletions

View file

@ -12,6 +12,7 @@ use Alltube\Library\Video;
use Alltube\LocaleManager;
use Alltube\SessionManager;
use Aura\Session\Segment;
use Consolidation\Log\Logger;
use Psr\Container\ContainerInterface;
use Slim\Http\Request;
use Slim\Http\Response;
@ -70,6 +71,11 @@ abstract class BaseController
*/
protected $downloader;
/**
* @var Logger
*/
protected $logger;
/**
* BaseController constructor.
*
@ -83,6 +89,7 @@ abstract class BaseController
$this->sessionSegment = $session->getSegment(self::class);
$this->localeManager = $this->container->get('locale');
$this->downloader = $this->config->getDownloader();
$this->downloader->setLogger($this->container->get('logger'));
if (!$this->config->stream) {
// Force HTTP if stream is not enabled.