1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

bug fixed plugins load

bug fixed with import browserDeviceProfile
This commit is contained in:
vitorsemeano 2020-10-17 20:04:52 +01:00
parent f15f6ec9b8
commit e525a46068
3 changed files with 12 additions and 14 deletions

View file

@ -5,6 +5,7 @@ import { Events } from 'jellyfin-apiclient';
import * as htmlMediaHelper from '../components/htmlMediaHelper';
import * as webSettings from '../scripts/settings/webSettings';
import globalize from '../scripts/globalize';
import profileBuilder from '../scripts/browserDeviceProfile';
function getBaseProfileOptions(item) {
const disableHlsVideoAudioCodecs = [];
@ -27,7 +28,6 @@ function getBaseProfileOptions(item) {
function getDeviceProfile(item, options = {}) {
return new Promise(function (resolve) {
import('../scripts/browserDeviceProfile').then((profileBuilder) => {
let profile;
if (window.NativeShell) {
@ -40,7 +40,6 @@ function getDeviceProfile(item, options = {}) {
resolve(profile);
});
});
}
function escapeRegExp(str) {

View file

@ -81,8 +81,7 @@ import globalize from '../scripts/globalize';
});
} else if (pluginSpec.then) {
return pluginSpec.then(({ default: pluginBuilder }) => {
return pluginBuilder();
}).then((plugin) => {
const plugin = new pluginBuilder;
console.debug(`Plugin loaded: ${plugin.id}`);
return this.#registerPlugin(plugin);
});

View file

@ -858,5 +858,5 @@ import browser from './browser';
});
return profile;
};
}
/* eslint-enable indent */