diff options
author | cglatot <[email protected]> | 2020-09-10 17:45:00 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-09-10 17:45:00 +0100 |
commit | e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d (patch) | |
tree | bc331a30ec9cea667166b087f9a4345a5cf5c957 | |
parent | 4e62be0b66c2b33ca8d5a911c5c756830c1c26da (diff) | |
download | pasta-e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d.tar.gz pasta-e6dddd7dd0a1fdacf60073f658c012e5c06e6c5d.zip |
Fix Local connection when only 1 server available
-rw-r--r-- | js/main.js | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -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(); |