diff --git a/package.json b/package.json index c22437bfc9..0ba198aac1 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "src/components/cardbuilder/cardBuilder.js", "src/scripts/dom.js", "src/components/filedownloader.js", - "src/components/filesystem.js", + "src/scripts/filesystem.js", "src/scripts/keyboardnavigation.js", "src/components/sanatizefilename.js", "src/components/scrollManager.js", diff --git a/src/components/apphost.js b/src/components/apphost.js index 6891ef9aa8..e5f48ac42e 100644 --- a/src/components/apphost.js +++ b/src/components/apphost.js @@ -46,20 +46,9 @@ define(["appSettings", "browser", "events", "htmlMediaHelper", "webSettings", "g if (window.NativeShell) { profile = window.NativeShell.AppHost.getDeviceProfile(profileBuilder); } else { - profile = profileBuilder(getBaseProfileOptions(item)); - - if (item && !options.isRetry && "allcomplexformats" !== appSettings.get("subtitleburnin")) { - if (!browser.orsay && !browser.tizen) { - profile.SubtitleProfiles.push({ - Format: "ass", - Method: "External" - }); - profile.SubtitleProfiles.push({ - Format: "ssa", - Method: "External" - }); - } - } + var builderOpts = getBaseProfileOptions(item); + builderOpts.enableSsaRender = (item && !options.isRetry && "allcomplexformats" !== appSettings.get("subtitleburnin")); + profile = profileBuilder(builderOpts); } resolve(profile); diff --git a/src/components/maintabsmanager.js b/src/components/maintabsmanager.js index 2571470015..e1c5434363 100644 --- a/src/components/maintabsmanager.js +++ b/src/components/maintabsmanager.js @@ -166,6 +166,7 @@ define(['dom', 'browser', 'events', 'emby-tabs', 'emby-button'], function (dom, }).join('') + ''; tabsContainerElem.innerHTML = tabsHtml; + window.CustomElements.upgradeSubtree(tabsContainerElem); document.body.classList.add('withSectionTabs'); tabOwnerView = view; diff --git a/src/components/notifications/notifications.js b/src/components/notifications/notifications.js index 8ba870613b..4b00171aee 100644 --- a/src/components/notifications/notifications.js +++ b/src/components/notifications/notifications.js @@ -5,7 +5,8 @@ define(['serverNotifications', 'playbackManager', 'events', 'globalize', 'requir document.removeEventListener('click', onOneDocumentClick); document.removeEventListener('keydown', onOneDocumentClick); - if (window.Notification) { + // don't request notification permissions if they're already granted or denied + if (window.Notification && window.Notification.permission === "default") { /* eslint-disable-next-line compat/compat */ Notification.requestPermission(); } diff --git a/src/scripts/browser.js b/src/scripts/browser.js index 8b21c85469..840ef6ac23 100644 --- a/src/scripts/browser.js +++ b/src/scripts/browser.js @@ -22,7 +22,7 @@ define([], function () { return true; } - if (userAgent.indexOf('webos') !== -1) { + if (userAgent.indexOf('web0s') !== -1) { return true; } diff --git a/src/scripts/browserdeviceprofile.js b/src/scripts/browserdeviceprofile.js index 570c0d2fa1..a269498dd0 100644 --- a/src/scripts/browserdeviceprofile.js +++ b/src/scripts/browserdeviceprofile.js @@ -887,6 +887,16 @@ define(['browser'], function (browser) { Method: 'External' }); } + if (options.enableSsaRender) { + profile.SubtitleProfiles.push({ + Format: 'ass', + Method: 'External' + }); + profile.SubtitleProfiles.push({ + Format: 'ssa', + Method: 'External' + }); + } profile.ResponseProfiles = []; profile.ResponseProfiles.push({ diff --git a/src/scripts/settings/webSettings.js b/src/scripts/settings/webSettings.js index 4b1b658e9b..8279c162fe 100644 --- a/src/scripts/settings/webSettings.js +++ b/src/scripts/settings/webSettings.js @@ -11,5 +11,8 @@ function getConfig() { export function enableMultiServer() { return getConfig().then(config => { return config.multiserver; + }).catch(error => { + console.log("cannot get web config:", error); + return false; }); } diff --git a/src/scripts/site.js b/src/scripts/site.js index df9bd44953..5ce093e628 100644 --- a/src/scripts/site.js +++ b/src/scripts/site.js @@ -709,6 +709,7 @@ var AppInfo = {}; onError: onRequireJsError }); + require(["fetch"]); require(["polyfill"]); require(["fast-text-encoding"]); require(["intersection-observer"]); diff --git a/webpack.dev.js b/webpack.dev.js index 78bdb54867..d0a8c69b8f 100644 --- a/webpack.dev.js +++ b/webpack.dev.js @@ -14,7 +14,7 @@ module.exports = merge(common, { rules: [ { test: /\.js$/, - exclude: /node_modules[\\/](?!query-string)/, + exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/, loader: "babel-loader" }, { diff --git a/webpack.prod.js b/webpack.prod.js index c2d5e97915..4405f8f164 100644 --- a/webpack.prod.js +++ b/webpack.prod.js @@ -7,7 +7,7 @@ module.exports = merge(common, { rules: [ { test: /\.js$/, - exclude: /node_modules[\\/](?!query-string)/, + exclude: /node_modules[\\/](?!query-string|split-on-first|strict-uri-encode)/, loader: "babel-loader" }, {