From 2f8c232ed8c72374d04f1bffce3836008c27e48e Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 9 Dec 2020 12:32:24 -0500 Subject: [PATCH 1/3] Use the version from package.json in apphost --- package.json | 2 +- src/components/apphost.js | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 83dad1798..cc60f04d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jellyfin-web", - "version": "0.0.0", + "version": "10.8.0", "description": "Web interface for Jellyfin", "repository": "https://github.com/jellyfin/jellyfin-web", "license": "GPL-2.0-or-later", diff --git a/src/components/apphost.js b/src/components/apphost.js index aefdee734..086286738 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -1,4 +1,4 @@ - +import { version } from '../../package.json'; import appSettings from '../scripts/settings/appSettings'; import browser from '../scripts/browser'; import { Events } from 'jellyfin-apiclient'; @@ -8,7 +8,6 @@ import globalize from '../scripts/globalize'; import profileBuilder from '../scripts/browserDeviceProfile'; const appName = 'Jellyfin Web'; -const appVersion = '10.7.0'; function getBaseProfileOptions(item) { const disableHlsVideoAudioCodecs = []; @@ -34,7 +33,7 @@ function getDeviceProfile(item, options = {}) { let profile; if (window.NativeShell) { - profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, appVersion); + profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, version); } else { const builderOpts = getBaseProfileOptions(item); profile = profileBuilder(builderOpts); @@ -370,7 +369,7 @@ export const appHost = { return window.NativeShell ? window.NativeShell.AppHost.appName() : appName; }, appVersion: function () { - return window.NativeShell ? window.NativeShell.AppHost.appVersion() : appVersion; + return window.NativeShell ? window.NativeShell.AppHost.appVersion() : version; }, getPushTokenInfo: function () { return {}; From 46fd6ca8f709af7c370d1fd359564addeed27efd Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 9 Dec 2020 12:33:46 -0500 Subject: [PATCH 2/3] Fix eslint warning --- src/components/apphost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/apphost.js b/src/components/apphost.js index 086286738..f2f6ccfcb 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -28,7 +28,7 @@ function getBaseProfileOptions(item) { }; } -function getDeviceProfile(item, options = {}) { +function getDeviceProfile(item) { return new Promise(function (resolve) { let profile; From 121d56e2182210b8e8af725220dabf21fe17fd7c Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 10 Dec 2020 10:53:54 -0500 Subject: [PATCH 3/3] Add alias for version import --- src/components/apphost.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/apphost.js b/src/components/apphost.js index f2f6ccfcb..36feb896f 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -1,4 +1,4 @@ -import { version } from '../../package.json'; +import { version as appVersion } from '../../package.json'; import appSettings from '../scripts/settings/appSettings'; import browser from '../scripts/browser'; import { Events } from 'jellyfin-apiclient'; @@ -33,7 +33,7 @@ function getDeviceProfile(item) { let profile; if (window.NativeShell) { - profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, version); + profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder, appVersion); } else { const builderOpts = getBaseProfileOptions(item); profile = profileBuilder(builderOpts); @@ -369,7 +369,7 @@ export const appHost = { return window.NativeShell ? window.NativeShell.AppHost.appName() : appName; }, appVersion: function () { - return window.NativeShell ? window.NativeShell.AppHost.appVersion() : version; + return window.NativeShell ? window.NativeShell.AppHost.appVersion() : appVersion; }, getPushTokenInfo: function () { return {};