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)
|
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'];
|
$liveCoding = $this->getApplication()->getContainer()['livecoding'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -28,7 +28,7 @@ class PlayCommand extends Command
|
||||||
$stream = strtolower(trim($input->getArgument('stream'), "/ \r\n"));
|
$stream = strtolower(trim($input->getArgument('stream'), "/ \r\n"));
|
||||||
|
|
||||||
if (0 === preg_match('/^\w+$/', $stream)) {
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -37,15 +37,15 @@ class PlayCommand extends Command
|
||||||
|
|
||||||
if (!empty($config['player']['before'])) {
|
if (!empty($config['player']['before'])) {
|
||||||
$command = $config['player']['before'];
|
$command = $config['player']['before'];
|
||||||
// $process = new Process($command);
|
$process = new Process($command);
|
||||||
// $process->run();
|
$process->run();
|
||||||
}
|
}
|
||||||
|
|
||||||
$hash = $this->getHash($this->getApplication()->buildUrl($stream.'/'));
|
$hash = $this->getHash($this->getApplication()->buildUrl($stream.'/'));
|
||||||
$command = $this->getApplication()->getPlayer($stream.'?t='.$hash);
|
$command = $this->getApplication()->getPlayer($stream.'?t='.$hash);
|
||||||
$process = new Process($command);
|
$process = new Process($command);
|
||||||
|
|
||||||
if ($this->getApplication()->isDebugMode()) {
|
if (!$this->getApplication()->isDebugMode()) {
|
||||||
$callback = function ($type, $buffer) use ($output) {
|
$callback = function ($type, $buffer) use ($output) {
|
||||||
if ('err' !== $type) {
|
if ('err' !== $type) {
|
||||||
$output->writeln($buffer);
|
$output->writeln($buffer);
|
||||||
|
|
Loading…
Reference in a new issue