mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add suggested changes and fix a return statement
This commit is contained in:
parent
60b70ad0c9
commit
cb9f250d32
3 changed files with 22 additions and 15 deletions
|
@ -12,7 +12,7 @@ define([], function() {
|
|||
}
|
||||
|
||||
function uploadContent(connectionManager, server, options) {
|
||||
return new Promise().resolve();
|
||||
return new Promise().reject();
|
||||
}
|
||||
|
||||
function syncMedia(connectionManager, server, options) {
|
||||
|
|
|
@ -114,10 +114,10 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function(appSett
|
|||
function onAppHidden() {
|
||||
_isHidden || (_isHidden = !0, console.log("app is hidden"))
|
||||
}
|
||||
var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0",
|
||||
var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0";
|
||||
supportedFeatures = function() {
|
||||
var features = [];
|
||||
return navigator.share && features.push("sharing");
|
||||
navigator.share && features.push("sharing");
|
||||
browser.edgeUwp || browser.tv || browser.xboxOne || browser.ps4 || features.push("filedownload");
|
||||
browser.operaTv || browser.tizen || browser.orsay || browser.web0s
|
||||
? features.push("exit")
|
||||
|
@ -138,6 +138,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function(appSett
|
|||
browser.orsay || browser.tizen || features.push("subtitleburnsettings");
|
||||
browser.tv || browser.ps4 || browser.xboxOne || features.push("fileinput");
|
||||
browser.chrome && features.push("chromecast");
|
||||
return features;
|
||||
}();
|
||||
if (supportedFeatures.indexOf("htmlvideoautoplay") === -1 && supportsHtmlMediaAutoplay() !=== false) {
|
||||
require(["autoPlayDetect"], function(autoPlayDetect) {
|
||||
|
|
|
@ -213,9 +213,15 @@ var Dashboard = {
|
|||
|
||||
function getSettingsBuilder(UserSettings, layoutManager, browser) {
|
||||
UserSettings.prototype.enableThemeVideos = function(val) {
|
||||
return null != val
|
||||
? this.set("enableThemeVideos", val.toString(), !1)
|
||||
: (val = this.get("enableThemeVideos", !1), val ? "false" !== val : !layoutManager.mobile && !browser.slow);
|
||||
if (val != null) {
|
||||
return this.set('enableThemeVideos', val.toString(), false);
|
||||
}
|
||||
val = this.get('enableThemeVideos', false);
|
||||
if (val !== 'false') {
|
||||
return !layoutManager.mobile;
|
||||
} else {
|
||||
return !browser.slow;
|
||||
}
|
||||
};
|
||||
return UserSettings;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue