From 8fd9d9cfc023f581f4e62741f8de47dee048654c Mon Sep 17 00:00:00 2001 From: Mario Lukas Date: Sat, 4 Feb 2023 12:39:48 +0100 Subject: [PATCH] fix (ui): fixed protocol selection for api requests --- src/ui/src/app/services/mopidy.service.ts | 2 +- src/ui/src/app/services/snapcast.service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ui/src/app/services/mopidy.service.ts b/src/ui/src/app/services/mopidy.service.ts index 9c4d2387..313170e7 100644 --- a/src/ui/src/app/services/mopidy.service.ts +++ b/src/ui/src/app/services/mopidy.service.ts @@ -389,7 +389,7 @@ export class MopidyPoolService { const hydraplayHost = url.hostname; const hdraplayProtocol = url.protocol; - this.http.get(hdraplayProtocol + "://" + hydraplayHost + ":" + hydraplayPort + "/api/settings").subscribe(settings => { + this.http.get(hdraplayProtocol + "//" + hydraplayHost + ":" + hydraplayPort + "/api/settings").subscribe(settings => { settings['mopidy_instances'].forEach(instance => { let mopidyPlayer = new MopidyPlayer( instance, settings['hydraplay'], this.notificationService ); diff --git a/src/ui/src/app/services/snapcast.service.ts b/src/ui/src/app/services/snapcast.service.ts index 323f8846..e1639331 100644 --- a/src/ui/src/app/services/snapcast.service.ts +++ b/src/ui/src/app/services/snapcast.service.ts @@ -68,7 +68,7 @@ export class SnapcastService { const hydraplayHost = url.hostname; const hdraplayProtocol = url.protocol; - return this.http.get(hdraplayProtocol + "://" + hydraplayHost + ":" + hydraplayPort + "/api/settings").pipe(map(response=>response)); + return this.http.get(hdraplayProtocol + "//" + hydraplayHost + ":" + hydraplayPort + "/api/settings").pipe(map(response=>response)); } public async connect(cfg: { reconnect: boolean } = { reconnect: false }) {