mirror of
https://github.com/moonlight-stream/moonlight-chrome.git
synced 2025-08-17 08:36:42 +00:00
Fix ability to update address of existing hosts via Add PC dialog
This commit is contained in:
parent
498bff4b0b
commit
584d504273
@ -323,8 +323,16 @@ function addHost() {
|
|||||||
var _nvhttpHost = new NvHTTP(inputHost, myUniqueid, inputHost);
|
var _nvhttpHost = new NvHTTP(inputHost, myUniqueid, inputHost);
|
||||||
|
|
||||||
pairTo(_nvhttpHost, function() {
|
pairTo(_nvhttpHost, function() {
|
||||||
|
// Check if we already have record of this host
|
||||||
|
if (hosts[_nvhttpHost.serverUid] != null) {
|
||||||
|
// Just update the addresses
|
||||||
|
hosts[_nvhttpHost.serverUid].address = _nvhttpHost.address;
|
||||||
|
hosts[_nvhttpHost.serverUid].userEnteredAddress = _nvhttpHost.userEnteredAddress;
|
||||||
|
}
|
||||||
|
else {
|
||||||
beginBackgroundPollingOfHost(_nvhttpHost);
|
beginBackgroundPollingOfHost(_nvhttpHost);
|
||||||
addHostToGrid(_nvhttpHost);
|
addHostToGrid(_nvhttpHost);
|
||||||
|
}
|
||||||
saveHosts();
|
saveHosts();
|
||||||
}, function() {
|
}, function() {
|
||||||
snackbarLog('pairing to ' + inputHost + ' failed!');
|
snackbarLog('pairing to ' + inputHost + ' failed!');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user