From 8e20fbb50ae56cdcfac07ef82e29dd0991533cab Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Tue, 14 Jul 2015 00:25:03 +0200 Subject: [PATCH] debug mode and clean up --- src/Deblan/Command/ListCommand.php | 5 ----- src/Deblan/Command/PlayCommand.php | 8 ++++---- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/src/Deblan/Command/ListCommand.php b/src/Deblan/Command/ListCommand.php index d822b7f..d5ad385 100644 --- a/src/Deblan/Command/ListCommand.php +++ b/src/Deblan/Command/ListCommand.php @@ -21,11 +21,6 @@ class ListCommand extends Command protected function execute(InputInterface $input, OutputInterface $output) { - // $this->getContainer()->get('foo.bar'); - // $output->writeln(sprintf('%s bar.', $example)); - // $input->getArgument('foo'); - // $input->getOption('bar'); - $liveCoding = $this->getApplication()->getContainer()['livecoding']; try { diff --git a/src/Deblan/Command/PlayCommand.php b/src/Deblan/Command/PlayCommand.php index 5ba4256..e5654a0 100644 --- a/src/Deblan/Command/PlayCommand.php +++ b/src/Deblan/Command/PlayCommand.php @@ -28,7 +28,7 @@ class PlayCommand extends Command $stream = strtolower(trim($input->getArgument('stream'), "/ \r\n")); if (0 === preg_match('/^\w+$/', $stream)) { - $output->writeln('The stream name is not valid.'); + $output->writeln('The stream name is not valid.'); return false; } @@ -37,15 +37,15 @@ class PlayCommand extends Command if (!empty($config['player']['before'])) { $command = $config['player']['before']; - // $process = new Process($command); - // $process->run(); + $process = new Process($command); + $process->run(); } $hash = $this->getHash($this->getApplication()->buildUrl($stream.'/')); $command = $this->getApplication()->getPlayer($stream.'?t='.$hash); $process = new Process($command); - if ($this->getApplication()->isDebugMode()) { + if (!$this->getApplication()->isDebugMode()) { $callback = function ($type, $buffer) use ($output) { if ('err' !== $type) { $output->writeln($buffer);