Pass ApiClientFactory instead of API client module
This commit is contained in:
@@ -157,6 +157,10 @@ _define("headroom", function () {
|
||||
// apiclient
|
||||
var apiclient = require("jellyfin-apiclient");
|
||||
|
||||
_define("apiclient", function () {
|
||||
return apiclient.apiclient;
|
||||
})
|
||||
|
||||
_define("events", function () {
|
||||
return apiclient.Events;
|
||||
});
|
||||
|
||||
+2
-2
@@ -288,10 +288,10 @@ var AppInfo = {};
|
||||
if (!AppInfo.isNativeApp) {
|
||||
console.debug("loading ApiClient singleton");
|
||||
|
||||
return require(["apiclient"], function (apiClientModule) {
|
||||
return require(["apiclient"], function (apiClientFactory) {
|
||||
console.debug("creating ApiClient singleton");
|
||||
|
||||
var apiClient = new apiClientModule.ApiClient(Dashboard.serverAddress(), apphost.appName(), apphost.appVersion(), apphost.deviceName(), apphost.deviceId());
|
||||
var apiClient = new apiClientFactory(Dashboard.serverAddress(), apphost.appName(), apphost.appVersion(), apphost.deviceName(), apphost.deviceId());
|
||||
|
||||
apiClient.enableAutomaticNetworking = false;
|
||||
apiClient.manualAddressOnly = true;
|
||||
|
||||
Reference in New Issue
Block a user