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:
parent
ee0b3f9ce9
commit
a9b439e458
1 changed files with 17 additions and 15 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue