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

allow version check for profileBuilder in nativeshell

This commit is contained in:
nyanmisaka 2020-11-30 01:28:33 +08:00
parent d3f584ffdf
commit 3bde8f1b65

View file

@ -7,6 +7,9 @@ import * as webSettings from '../scripts/settings/webSettings';
import globalize from '../scripts/globalize'; import globalize from '../scripts/globalize';
import profileBuilder from '../scripts/browserDeviceProfile'; import profileBuilder from '../scripts/browserDeviceProfile';
const appName = 'Jellyfin Web';
const appVersion = '10.7.0';
function getBaseProfileOptions(item) { function getBaseProfileOptions(item) {
const disableHlsVideoAudioCodecs = []; const disableHlsVideoAudioCodecs = [];
@ -31,7 +34,7 @@ function getDeviceProfile(item, options = {}) {
let profile; let profile;
if (window.NativeShell) { if (window.NativeShell) {
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder); profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, appVersion);
} else { } else {
const builderOpts = getBaseProfileOptions(item); const builderOpts = getBaseProfileOptions(item);
profile = profileBuilder(builderOpts); profile = profileBuilder(builderOpts);
@ -316,8 +319,6 @@ function askForExit() {
let deviceId; let deviceId;
let deviceName; let deviceName;
const appName = 'Jellyfin Web';
const appVersion = '10.7.0';
export const appHost = { export const appHost = {
getWindowState: function () { getWindowState: function () {