mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
update components
This commit is contained in:
parent
8843f08890
commit
56c121afff
5 changed files with 132 additions and 28 deletions
|
@ -850,24 +850,27 @@
|
|||
|
||||
return new Promise(function (resolve, reject) {
|
||||
|
||||
var onFinish = function (foundServers) {
|
||||
var servers = foundServers.map(function (foundServer) {
|
||||
|
||||
var info = {
|
||||
Id: foundServer.Id,
|
||||
LocalAddress: foundServer.Address,
|
||||
Name: foundServer.Name,
|
||||
ManualAddress: convertEndpointAddressToManualAddress(foundServer),
|
||||
DateLastLocalConnection: new Date().getTime()
|
||||
};
|
||||
|
||||
info.LastConnectionMode = info.ManualAddress ? ConnectionMode.Manual : ConnectionMode.Local;
|
||||
|
||||
return info;
|
||||
});
|
||||
resolve(servers);
|
||||
};
|
||||
|
||||
require(['serverdiscovery'], function (serverDiscovery) {
|
||||
serverDiscovery.findServers(1000).then(function (foundServers) {
|
||||
|
||||
var servers = foundServers.map(function (foundServer) {
|
||||
|
||||
var info = {
|
||||
Id: foundServer.Id,
|
||||
LocalAddress: foundServer.Address,
|
||||
Name: foundServer.Name,
|
||||
ManualAddress: convertEndpointAddressToManualAddress(foundServer),
|
||||
DateLastLocalConnection: new Date().getTime()
|
||||
};
|
||||
|
||||
info.LastConnectionMode = info.ManualAddress ? ConnectionMode.Manual : ConnectionMode.Local;
|
||||
|
||||
return info;
|
||||
});
|
||||
resolve(servers);
|
||||
serverDiscovery.findServers(1000).then(onFinish, function () {
|
||||
onFinish([]);
|
||||
});
|
||||
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue