bug fixed plugins load
bug fixed with import browserDeviceProfile
This commit is contained in:
parent
f15f6ec9b8
commit
e525a46068
3 changed files with 12 additions and 14 deletions
|
@ -5,6 +5,7 @@ import { Events } from 'jellyfin-apiclient';
|
||||||
import * as htmlMediaHelper from '../components/htmlMediaHelper';
|
import * as htmlMediaHelper from '../components/htmlMediaHelper';
|
||||||
import * as webSettings from '../scripts/settings/webSettings';
|
import * as webSettings from '../scripts/settings/webSettings';
|
||||||
import globalize from '../scripts/globalize';
|
import globalize from '../scripts/globalize';
|
||||||
|
import profileBuilder from '../scripts/browserDeviceProfile';
|
||||||
|
|
||||||
function getBaseProfileOptions(item) {
|
function getBaseProfileOptions(item) {
|
||||||
const disableHlsVideoAudioCodecs = [];
|
const disableHlsVideoAudioCodecs = [];
|
||||||
|
@ -27,19 +28,17 @@ function getBaseProfileOptions(item) {
|
||||||
|
|
||||||
function getDeviceProfile(item, options = {}) {
|
function getDeviceProfile(item, options = {}) {
|
||||||
return new Promise(function (resolve) {
|
return new Promise(function (resolve) {
|
||||||
import('../scripts/browserDeviceProfile').then((profileBuilder) => {
|
let profile;
|
||||||
let profile;
|
|
||||||
|
|
||||||
if (window.NativeShell) {
|
if (window.NativeShell) {
|
||||||
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder);
|
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder);
|
||||||
} else {
|
} else {
|
||||||
const builderOpts = getBaseProfileOptions(item);
|
const builderOpts = getBaseProfileOptions(item);
|
||||||
builderOpts.enableSsaRender = (item && !options.isRetry && appSettings.get('subtitleburnin') !== 'allcomplexformats');
|
builderOpts.enableSsaRender = (item && !options.isRetry && appSettings.get('subtitleburnin') !== 'allcomplexformats');
|
||||||
profile = profileBuilder(builderOpts);
|
profile = profileBuilder(builderOpts);
|
||||||
}
|
}
|
||||||
|
|
||||||
resolve(profile);
|
resolve(profile);
|
||||||
});
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,8 +81,7 @@ import globalize from '../scripts/globalize';
|
||||||
});
|
});
|
||||||
} else if (pluginSpec.then) {
|
} else if (pluginSpec.then) {
|
||||||
return pluginSpec.then(({ default: pluginBuilder }) => {
|
return pluginSpec.then(({ default: pluginBuilder }) => {
|
||||||
return pluginBuilder();
|
const plugin = new pluginBuilder;
|
||||||
}).then((plugin) => {
|
|
||||||
console.debug(`Plugin loaded: ${plugin.id}`);
|
console.debug(`Plugin loaded: ${plugin.id}`);
|
||||||
return this.#registerPlugin(plugin);
|
return this.#registerPlugin(plugin);
|
||||||
});
|
});
|
||||||
|
|
|
@ -858,5 +858,5 @@ import browser from './browser';
|
||||||
});
|
});
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
};
|
}
|
||||||
/* eslint-enable indent */
|
/* eslint-enable indent */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue