From 2ccc03e7e1f3d01f99d1ea7f3c4f8711e16a3316 Mon Sep 17 00:00:00 2001 From: Varun Patil Date: Fri, 17 Mar 2023 09:32:43 -0700 Subject: [PATCH] vod: allow configuring connect address Signed-off-by: Varun Patil --- lib/Controller/VideoController.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/Controller/VideoController.php b/lib/Controller/VideoController.php index 3189dbc3..ddb80049 100644 --- a/lib/Controller/VideoController.php +++ b/lib/Controller/VideoController.php @@ -271,10 +271,11 @@ class VideoController extends ApiBase { $config = \OC::$server->get(\OCP\IConfig::class); $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)