From e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d Mon Sep 17 00:00:00 2001 From: cglatot Date: Thu, 10 Sep 2020 17:45:00 +0100 Subject: Fix Local connection when only 1 server available --- js/main.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/main.js b/js/main.js index 6bef51a..7e7d938 100644 --- a/js/main.js +++ b/js/main.js @@ -240,6 +240,13 @@ function getServers () { }); } } else { + let addressToUse = ""; + // Check whether to use local address or public address + if ($('#connectViaLocalAddress').prop('checked')) { + addressToUse = $(servers[0]).attr("localAddresses").split(',')[0]; + } else { + addressToUse = $(servers[0]).attr("address"); + } plexToken = $(servers[0]).attr("accessToken"); plexUrl = `http://${addressToUse}:${$(servers[0]).attr("port")}`; //connectToPlex(); -- cgit v1.2.3