aboutsummaryrefslogtreecommitdiffhomepage
path: root/js/main.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/main.js')
-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();