1
0
Fork 0
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:
dkanada 2019-01-22 02:24:12 +09:00
parent 60b70ad0c9
commit cb9f250d32
3 changed files with 22 additions and 15 deletions

View file

@ -12,7 +12,7 @@ define([], function() {
} }
function uploadContent(connectionManager, server, options) { function uploadContent(connectionManager, server, options) {
return new Promise().resolve(); return new Promise().reject();
} }
function syncMedia(connectionManager, server, options) { function syncMedia(connectionManager, server, options) {

View file

@ -114,10 +114,10 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function(appSett
function onAppHidden() { function onAppHidden() {
_isHidden || (_isHidden = !0, console.log("app is hidden")) _isHidden || (_isHidden = !0, console.log("app is hidden"))
} }
var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0", var htmlMediaAutoplayAppStorageKey = "supportshtmlmediaautoplay0";
supportedFeatures = function() { supportedFeatures = function() {
var features = []; 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.edgeUwp || browser.tv || browser.xboxOne || browser.ps4 || features.push("filedownload");
browser.operaTv || browser.tizen || browser.orsay || browser.web0s browser.operaTv || browser.tizen || browser.orsay || browser.web0s
? features.push("exit") ? features.push("exit")
@ -138,6 +138,7 @@ define(["appSettings", "browser", "events", "htmlMediaHelper"], function(appSett
browser.orsay || browser.tizen || features.push("subtitleburnsettings"); browser.orsay || browser.tizen || features.push("subtitleburnsettings");
browser.tv || browser.ps4 || browser.xboxOne || features.push("fileinput"); browser.tv || browser.ps4 || browser.xboxOne || features.push("fileinput");
browser.chrome && features.push("chromecast"); browser.chrome && features.push("chromecast");
return features;
}(); }();
if (supportedFeatures.indexOf("htmlvideoautoplay") === -1 && supportsHtmlMediaAutoplay() !=== false) { if (supportedFeatures.indexOf("htmlvideoautoplay") === -1 && supportsHtmlMediaAutoplay() !=== false) {
require(["autoPlayDetect"], function(autoPlayDetect) { require(["autoPlayDetect"], function(autoPlayDetect) {

View file

@ -213,9 +213,15 @@ var Dashboard = {
function getSettingsBuilder(UserSettings, layoutManager, browser) { function getSettingsBuilder(UserSettings, layoutManager, browser) {
UserSettings.prototype.enableThemeVideos = function(val) { UserSettings.prototype.enableThemeVideos = function(val) {
return null != val if (val != null) {
? this.set("enableThemeVideos", val.toString(), !1) return this.set('enableThemeVideos', val.toString(), false);
: (val = this.get("enableThemeVideos", !1), val ? "false" !== val : !layoutManager.mobile && !browser.slow); }
val = this.get('enableThemeVideos', false);
if (val !== 'false') {
return !layoutManager.mobile;
} else {
return !browser.slow;
}
}; };
return UserSettings; return UserSettings;
} }