debug mode and clean up
This commit is contained in:
parent
d139fdd481
commit
8e20fbb50a
|
@ -21,11 +21,6 @@ class ListCommand extends Command
|
|||
|
||||
protected function execute(InputInterface $input, OutputInterface $output)
|
||||
{
|
||||
// $this->getContainer()->get('foo.bar');
|
||||
// $output->writeln(sprintf('<comment>%s</comment> bar.', $example));
|
||||
// $input->getArgument('foo');
|
||||
// $input->getOption('bar');
|
||||
|
||||
$liveCoding = $this->getApplication()->getContainer()['livecoding'];
|
||||
|
||||
try {
|
||||
|
|
|
@ -28,7 +28,7 @@ class PlayCommand extends Command
|
|||
$stream = strtolower(trim($input->getArgument('stream'), "/ \r\n"));
|
||||
|
||||
if (0 === preg_match('/^\w+$/', $stream)) {
|
||||
$output->writeln('<error>The stream name is not valid.');
|
||||
$output->writeln('<error>The stream name is not valid.</error>');
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue