1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

restore enableautologin condition

This commit is contained in:
grafixeyehero 2019-10-28 21:04:01 +03:00
parent ee0b3f9ce9
commit a9b439e458

View file

@ -402,7 +402,9 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
var credentials = credentialProvider.credentials(); var credentials = credentialProvider.credentials();
options = options || {}; options = options || {};
afterConnectValidated(server, credentials, systemInfo, connectionMode, serverUrl, true, options, resolve); if (false !== options.enableAutoLogin) {
afterConnectValidated(server, credentials, systemInfo, connectionMode, serverUrl, true, options, resolve);
}
} }
function afterConnectValidated(server, credentials, systemInfo, connectionMode, serverUrl, verifyLocalAuthentication, options, resolve) { function afterConnectValidated(server, credentials, systemInfo, connectionMode, serverUrl, verifyLocalAuthentication, options, resolve) {
@ -711,28 +713,28 @@ define(["events", "apiclient", "appStorage"], function (events, apiClientFactory
self.deleteServer = function (serverId) { self.deleteServer = function (serverId) {
if (!serverId) { if (!serverId) {
throw new Error("null serverId"); throw new Error("null serverId");
} }
var server = credentialProvider.credentials().Servers.filter(function (s) { var server = credentialProvider.credentials().Servers.filter(function (s) {
return s.Id === serverId; return s.Id === serverId;
}); });
server = server.length ? server[0] : null; server = server.length ? server[0] : null;
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
function onDone() { function onDone() {
var credentials = credentialProvider.credentials(); var credentials = credentialProvider.credentials();
credentials.Servers = credentials.Servers.filter(function (s) { credentials.Servers = credentials.Servers.filter(function (s) {
return s.Id !== serverId; return s.Id !== serverId;
}); });
credentialProvider.credentials(credentials); credentialProvider.credentials(credentials);
resolve(); resolve();
} }
if (!server.ConnectServerId) { if (!server.ConnectServerId) {
return void onDone(); return void onDone();
} }
}); });
}; };
}; };
ConnectionManager.prototype.connect = function (options) { ConnectionManager.prototype.connect = function (options) {