aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorcglatot <[email protected]>2020-09-10 17:45:00 +0100
committerGitHub <[email protected]>2020-09-10 17:45:00 +0100
commite6dddd7dd0a1fdacf60073f658c012e5c06e6c5d (patch)
treebc331a30ec9cea667166b087f9a4345a5cf5c957
parent4e62be0b66c2b33ca8d5a911c5c756830c1c26da (diff)
downloadpasta-e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d.tar.gz
pasta-e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d.zip
Fix Local connection when only 1 server available
-rw-r--r--js/main.js7
1 files changed, 7 insertions, 0 deletions
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();