mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Pass ApiClientFactory instead of API client module
This commit is contained in:
parent
4dc7be9422
commit
8e337da01d
2 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
});
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue