vod: allow configuring connect address

Signed-off-by: Varun Patil <varunpatil@ucla.edu>
pull/504/head
Varun Patil 2023-03-17 09:32:43 -07:00
parent 17c494e5f9
commit 2ccc03e7e1
1 changed files with 4 additions and 3 deletions

View File

@ -271,10 +271,11 @@ class VideoController extends ApiBase
{ {
$config = \OC::$server->get(\OCP\IConfig::class); $config = \OC::$server->get(\OCP\IConfig::class);
$path = rawurlencode($path); $path = rawurlencode($path);
$bind = $config->getSystemValue('memories.vod.bind', '127.0.0.1:47788');
$port = explode(':', $bind)[1];
return "http://127.0.0.1:{$port}/{$client}{$path}/{$profile}"; $bind = $config->getSystemValue('memories.vod.bind', '127.0.0.1:47788');
$connect = $config->getSystemValue('memories.vod.connect', $bind);
return "http://{$connect}/{$client}{$path}/{$profile}";
} }
private function getUpstream(string $client, string $path, string $profile) private function getUpstream(string $client, string $path, string $profile)