From 4be8a788b08e049284a5a1910976cf078d81a917 Mon Sep 17 00:00:00 2001 From: vitorsemeano Date: Sat, 16 Mar 2019 17:15:37 +0000 Subject: [PATCH] assume server discovery is in NativeShell api --- .../emby-apiclient/connectionmanager.js | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bower_components/emby-apiclient/connectionmanager.js b/src/bower_components/emby-apiclient/connectionmanager.js index 39824d31f7..93e9673a46 100644 --- a/src/bower_components/emby-apiclient/connectionmanager.js +++ b/src/bower_components/emby-apiclient/connectionmanager.js @@ -269,12 +269,15 @@ define(["events", "apiclient", "appStorage"], function(events, apiClientFactory, }); resolve(servers) }; - require(["serverdiscovery"], function(serverDiscovery) { - serverDiscovery.findServers(1e3).then(onFinish, function() { + + if (window.NativeShell && typeof window.NativeShell.findServers === 'function') { + window.NativeShell.findServers(1e3).then(onFinish, function() { onFinish([]) - }) - }) - }) + }); + } else { + resolve([]); + } + }); } function convertEndpointAddressToManualAddress(info) {