Skip to content

Commit 8e337da

Browse files
committed
Pass ApiClientFactory instead of API client module
1 parent 4dc7be9 commit 8e337da

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/bundle.js

+4
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,10 @@ _define("headroom", function () {
157157
// apiclient
158158
var apiclient = require("jellyfin-apiclient");
159159

160+
_define("apiclient", function () {
161+
return apiclient.apiclient;
162+
})
163+
160164
_define("events", function () {
161165
return apiclient.Events;
162166
});

src/scripts/site.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -288,10 +288,10 @@ var AppInfo = {};
288288
if (!AppInfo.isNativeApp) {
289289
console.debug("loading ApiClient singleton");
290290

291-
return require(["apiclient"], function (apiClientModule) {
291+
return require(["apiclient"], function (apiClientFactory) {
292292
console.debug("creating ApiClient singleton");
293293

294-
var apiClient = new apiClientModule.ApiClient(Dashboard.serverAddress(), apphost.appName(), apphost.appVersion(), apphost.deviceName(), apphost.deviceId());
294+
var apiClient = new apiClientFactory(Dashboard.serverAddress(), apphost.appName(), apphost.appVersion(), apphost.deviceName(), apphost.deviceId());
295295

296296
apiClient.enableAutomaticNetworking = false;
297297
apiClient.manualAddressOnly = true;

0 commit comments

Comments
 (0)