Use the version from package.json in apphost

This commit is contained in:
Bill Thornton 2020-12-09 12:32:24 -05:00
parent 60e8fc4d8e
commit 2f8c232ed8
2 changed files with 4 additions and 5 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "jellyfin-web", "name": "jellyfin-web",
"version": "0.0.0", "version": "10.8.0",
"description": "Web interface for Jellyfin", "description": "Web interface for Jellyfin",
"repository": "https://github.com/jellyfin/jellyfin-web", "repository": "https://github.com/jellyfin/jellyfin-web",
"license": "GPL-2.0-or-later", "license": "GPL-2.0-or-later",

View File

@ -1,4 +1,4 @@
import { version } from '../../package.json';
import appSettings from '../scripts/settings/appSettings'; import appSettings from '../scripts/settings/appSettings';
import browser from '../scripts/browser'; import browser from '../scripts/browser';
import { Events } from 'jellyfin-apiclient'; import { Events } from 'jellyfin-apiclient';
@ -8,7 +8,6 @@ import globalize from '../scripts/globalize';
import profileBuilder from '../scripts/browserDeviceProfile'; import profileBuilder from '../scripts/browserDeviceProfile';
const appName = 'Jellyfin Web'; const appName = 'Jellyfin Web';
const appVersion = '10.7.0';
function getBaseProfileOptions(item) { function getBaseProfileOptions(item) {
const disableHlsVideoAudioCodecs = []; const disableHlsVideoAudioCodecs = [];
@ -34,7 +33,7 @@ function getDeviceProfile(item, options = {}) {
let profile; let profile;
if (window.NativeShell) { if (window.NativeShell) {
profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, appVersion); profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, version);
} else { } else {
const builderOpts = getBaseProfileOptions(item); const builderOpts = getBaseProfileOptions(item);
profile = profileBuilder(builderOpts); profile = profileBuilder(builderOpts);
@ -370,7 +369,7 @@ export const appHost = {
return window.NativeShell ? window.NativeShell.AppHost.appName() : appName; return window.NativeShell ? window.NativeShell.AppHost.appName() : appName;
}, },
appVersion: function () { appVersion: function () {
return window.NativeShell ? window.NativeShell.AppHost.appVersion() : appVersion; return window.NativeShell ? window.NativeShell.AppHost.appVersion() : version;
}, },
getPushTokenInfo: function () { getPushTokenInfo: function () {
return {}; return {};