mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add connection manager method
This commit is contained in:
parent
77578c185f
commit
341158a9c7
2 changed files with 18 additions and 1 deletions
|
@ -288,7 +288,7 @@
|
||||||
|
|
||||||
html += '<div class="editorTile imageEditorTile">';
|
html += '<div class="editorTile imageEditorTile">';
|
||||||
|
|
||||||
html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { enableImageEnhancers: false, height: 144 }) + '\');"></div>';
|
html += '<div style="height:144px;vertical-align:top;background-repeat:no-repeat;background-size:contain;background-image:url(\'' + LibraryBrowser.getImageUrl(currentItem, image.ImageType, image.ImageIndex, { height: 144 }) + '\');"></div>';
|
||||||
|
|
||||||
html += '<div>';
|
html += '<div>';
|
||||||
|
|
||||||
|
|
|
@ -169,6 +169,23 @@
|
||||||
return apiClient;
|
return apiClient;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
self.getOrCreateApiClient = function (serverId) {
|
||||||
|
|
||||||
|
var apiClient = self.getApiClient(serverId);
|
||||||
|
|
||||||
|
if (apiClient) {
|
||||||
|
return apiClient;
|
||||||
|
}
|
||||||
|
|
||||||
|
var credentials = credentialProvider.credentials();
|
||||||
|
var server = credentials.servers.filter(function (s) {
|
||||||
|
return stringEqualsIgnoreCase(s.Id, serverId);
|
||||||
|
|
||||||
|
})[0];
|
||||||
|
|
||||||
|
return getOrAddApiClient(server, server.LastConnectionMode);
|
||||||
|
};
|
||||||
|
|
||||||
function onAuthenticated(apiClient, result, options, saveCredentials) {
|
function onAuthenticated(apiClient, result, options, saveCredentials) {
|
||||||
|
|
||||||
var server = apiClient.serverInfo;
|
var server = apiClient.serverInfo;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue