update connect

This commit is contained in:
Luke Pulverenti 2015-06-04 16:27:46 -04:00
parent 2f83f86ee8
commit c7da2478bb
21 changed files with 72 additions and 28 deletions

View file

@ -372,11 +372,15 @@
throw new Error('connectionMode cannot be null');
}
logger.log('Begin updateServerInfo');
logger.log('Begin updateServerInfo. connectionMode: ' + connectionMode);
self.serverInfo(server);
var serverUrl = MediaBrowser.ServerInfo.getServerAddress(connectionMode);
var serverUrl = MediaBrowser.ServerInfo.getServerAddress(server, connectionMode);
if (!serverUrl) {
throw new Error('serverUrl cannot be null. serverInfo: ' + JSON.stringify(server));
}
logger.log('Setting server address to ' + serverUrl);
self.serverAddress(serverUrl);
};

View file

@ -769,7 +769,7 @@
} else {
var firstServer = servers[0];
var firstServer = servers.length ? servers[0] : null;
// See if we have any saved credentials and can auto sign in
if (firstServer) {
self.connectToServer(firstServer).done(function (result) {

View file

@ -75,6 +75,9 @@
if (server.RemoteAddress) {
existing.RemoteAddress = server.RemoteAddress;
}
if (server.ManualAddress) {
existing.ManualAddress = server.ManualAddress;
}
if (server.LocalAddress) {
existing.LocalAddress = server.LocalAddress;
}