mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
unify appSettings
This commit is contained in:
parent
5466e3660a
commit
87e23915c8
21 changed files with 208 additions and 408 deletions
|
@ -15,12 +15,12 @@
|
||||||
},
|
},
|
||||||
"devDependencies": {},
|
"devDependencies": {},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"version": "1.1.11",
|
"version": "1.1.12",
|
||||||
"_release": "1.1.11",
|
"_release": "1.1.12",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "1.1.11",
|
"tag": "1.1.12",
|
||||||
"commit": "6ce06fe70a6ae8cdc7c54db290fe192d4cf9656d"
|
"commit": "780eab96948c0418dd4e0e158569c4b8873708d6"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
"_source": "git://github.com/MediaBrowser/emby-webcomponents.git",
|
||||||
"_target": "~1.1.5",
|
"_target": "~1.1.5",
|
||||||
|
|
|
@ -35,6 +35,47 @@ define(['appStorage'], function (appStorage) {
|
||||||
|
|
||||||
return parseInt(get('preferredVideoBitrate') || '') || 1500000;
|
return parseInt(get('preferredVideoBitrate') || '') || 1500000;
|
||||||
},
|
},
|
||||||
|
maxChromecastBitrate: function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
set('chromecastBitrate1', val);
|
||||||
|
}
|
||||||
|
|
||||||
|
val = get('chromecastBitrate1');
|
||||||
|
|
||||||
|
return val ? parseInt(val) : null;
|
||||||
|
},
|
||||||
|
syncOnlyOnWifi: function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
set('syncOnlyOnWifi', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return get('syncOnlyOnWifi') != 'false';
|
||||||
|
},
|
||||||
|
syncPath: function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
set('syncPath', val);
|
||||||
|
}
|
||||||
|
|
||||||
|
return get('syncPath');
|
||||||
|
},
|
||||||
|
|
||||||
|
cameraUploadServers: function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
set('cameraUploadServers', val.join(','));
|
||||||
|
}
|
||||||
|
|
||||||
|
val = get('cameraUploadServers');
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
return val.split(',');
|
||||||
|
}
|
||||||
|
|
||||||
|
return [];
|
||||||
|
},
|
||||||
set: set,
|
set: set,
|
||||||
get: get
|
get: get
|
||||||
};
|
};
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
"webcomponentsjs": "webcomponents/webcomponentsjs#^0.7.0"
|
||||||
},
|
},
|
||||||
"ignore": [],
|
"ignore": [],
|
||||||
"homepage": "https://github.com/polymerelements/iron-behaviors",
|
"homepage": "https://github.com/PolymerElements/iron-behaviors",
|
||||||
"_release": "1.0.13",
|
"_release": "1.0.13",
|
||||||
"_resolution": {
|
"_resolution": {
|
||||||
"type": "version",
|
"type": "version",
|
||||||
"tag": "v1.0.13",
|
"tag": "v1.0.13",
|
||||||
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
"commit": "a7bc3428a6da2beed21987b3a8028206826a12bc"
|
||||||
},
|
},
|
||||||
"_source": "git://github.com/polymerelements/iron-behaviors.git",
|
"_source": "git://github.com/PolymerElements/iron-behaviors.git",
|
||||||
"_target": "^1.0.0",
|
"_target": "^1.0.0",
|
||||||
"_originalSource": "polymerelements/iron-behaviors"
|
"_originalSource": "PolymerElements/iron-behaviors"
|
||||||
}
|
}
|
|
@ -1620,18 +1620,6 @@ progress {
|
||||||
max-width: 200px;
|
max-width: 200px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sessionUserInfo {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
bottom: 11px;
|
|
||||||
padding: .5em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sessionUserInfo img {
|
|
||||||
height: 24px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.sessionNowPlayingInfo {
|
.sessionNowPlayingInfo {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
|
@ -1672,7 +1660,7 @@ progress {
|
||||||
color: #000;
|
color: #000;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activeSession:not(.playingSession) .sessionUserInfo, .activeSession:not(.playingSession) .sessionNowPlayingInfo {
|
.activeSession:not(.playingSession) .sessionNowPlayingInfo {
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1680,7 +1668,7 @@ progress {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
bottom: 19px;
|
bottom: 39px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sessionTranscodingFramerate {
|
.sessionTranscodingFramerate {
|
||||||
|
@ -1693,8 +1681,8 @@ progress {
|
||||||
.sessionNowPlayingStreamInfo {
|
.sessionNowPlayingStreamInfo {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 10px;
|
right: 10px;
|
||||||
top: 10px;
|
bottom: 19px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.activeSession .transcodingProgress {
|
.activeSession .transcodingProgress {
|
||||||
|
|
|
@ -10,60 +10,6 @@
|
||||||
<div data-role="content">
|
<div data-role="content">
|
||||||
<form class="displayPreferencesForm userProfileSettingsForm" style="margin: 0 auto;">
|
<form class="displayPreferencesForm userProfileSettingsForm" style="margin: 0 auto;">
|
||||||
|
|
||||||
<div class="detailSection languageSection">
|
|
||||||
<h1>
|
|
||||||
${HeaderLanguage}
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<div class="detailSectionContent">
|
|
||||||
<br />
|
|
||||||
<div>
|
|
||||||
<label for="selectLanguage" class="selectLabel">${LabelPreferredDisplayLanguage}</label>
|
|
||||||
<select id="selectLanguage" data-mini="true">
|
|
||||||
<option value="ar">Arabic</option>
|
|
||||||
<option value="bg-BG">Bulgarian (Bulgaria)</option>
|
|
||||||
<option value="ca">Catalan</option>
|
|
||||||
<option value="zh-CN">Chinese Simplified</option>
|
|
||||||
<option value="zh-TW">Chinese Traditional</option>
|
|
||||||
<option value="hr">Croatian</option>
|
|
||||||
<option value="cs">Czech</option>
|
|
||||||
<option value="da">Danish</option>
|
|
||||||
<option value="nl">Dutch</option>
|
|
||||||
<option value="en-GB">English (United Kingdom)</option>
|
|
||||||
<option value="en-US">English (United States)</option>
|
|
||||||
<option value="fi">Finnish</option>
|
|
||||||
<option value="fr">French</option>
|
|
||||||
<option value="de">German</option>
|
|
||||||
<option value="el">Greek</option>
|
|
||||||
<option value="he">Hebrew</option>
|
|
||||||
<option value="hu">Hungarian</option>
|
|
||||||
<option value="id">Indonesian</option>
|
|
||||||
<option value="it">Italian</option>
|
|
||||||
<option value="kk">Kazakh</option>
|
|
||||||
<option value="nb">Norwegian Bokmål</option>
|
|
||||||
<option value="pl">Polish</option>
|
|
||||||
<option value="pt-BR">Portuguese (Brazil)</option>
|
|
||||||
<option value="pt-PT">Portuguese (Portugal)</option>
|
|
||||||
<option value="ru">Russian</option>
|
|
||||||
<option value="sl-SI">Slovenian (Slovenia)</option>
|
|
||||||
<option value="es-ES">Spanish</option>
|
|
||||||
<option value="es-MX">Spanish (Mexico)</option>
|
|
||||||
<option value="sv">Swedish</option>
|
|
||||||
<option value="tr">Turkish</option>
|
|
||||||
<option value="uk">Ukrainian</option>
|
|
||||||
<option value="vi">Vietnamese</option>
|
|
||||||
</select>
|
|
||||||
<div class="fieldDescription">
|
|
||||||
<div>${LabelPreferredDisplayLanguageHelp}</div>
|
|
||||||
<div style="margin-top: .25em;">
|
|
||||||
<a href="http://emby.media/community/index.php?/topic/5727-join-our-translation-team/" target="_blank">${LabelReadHowYouCanContribute}</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="detailSection">
|
<div class="detailSection">
|
||||||
<h1>
|
<h1>
|
||||||
${HeaderNavigation}
|
${HeaderNavigation}
|
||||||
|
|
|
@ -1,130 +0,0 @@
|
||||||
(function (window) {
|
|
||||||
|
|
||||||
function update(key, val) {
|
|
||||||
appStorage.setItem(key, val);
|
|
||||||
|
|
||||||
Events.trigger(AppSettings, 'settingupdated', [key]);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.AppSettings = {
|
|
||||||
|
|
||||||
enableAutomaticBitrateDetection: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('enableAutomaticBitrateDetection', val.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
var savedVal = appStorage.getItem('enableAutomaticBitrateDetection');
|
|
||||||
|
|
||||||
if (!savedVal) {
|
|
||||||
if (AppInfo.isNativeApp) {
|
|
||||||
//return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('enableAutomaticBitrateDetection') != 'false';
|
|
||||||
},
|
|
||||||
maxStreamingBitrate: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('preferredVideoBitrate', val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return parseInt(appStorage.getItem('preferredVideoBitrate') || '') || 1500000;
|
|
||||||
},
|
|
||||||
maxChromecastBitrate: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('chromecastBitrate1', val);
|
|
||||||
}
|
|
||||||
|
|
||||||
val = appStorage.getItem('chromecastBitrate1');
|
|
||||||
|
|
||||||
return val ? parseInt(val) : null;
|
|
||||||
},
|
|
||||||
enableExternalPlayers: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('externalplayers', val.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('externalplayers') == 'true';
|
|
||||||
},
|
|
||||||
enableCinemaMode: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('enableCinemaMode', val.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
val = appStorage.getItem('enableCinemaMode');
|
|
||||||
|
|
||||||
if (val) {
|
|
||||||
return val != 'false';
|
|
||||||
}
|
|
||||||
|
|
||||||
if (browserInfo.mobile) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
|
||||||
},
|
|
||||||
enableFullScreen: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('enableFullScreen', val.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('enableFullScreen') == 'true';
|
|
||||||
},
|
|
||||||
syncOnlyOnWifi: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('syncOnlyOnWifi', val.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('syncOnlyOnWifi') != 'false';
|
|
||||||
},
|
|
||||||
syncPath: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('syncPath', val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('syncPath');
|
|
||||||
},
|
|
||||||
|
|
||||||
displayLanguage: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('displayLanguage', val);
|
|
||||||
}
|
|
||||||
|
|
||||||
return appStorage.getItem('displayLanguage') || navigator.language || navigator.userLanguage || 'en-US';
|
|
||||||
},
|
|
||||||
|
|
||||||
cameraUploadServers: function (val) {
|
|
||||||
|
|
||||||
if (val != null) {
|
|
||||||
update('cameraUploadServers', val.join(','));
|
|
||||||
}
|
|
||||||
|
|
||||||
val = appStorage.getItem('cameraUploadServers');
|
|
||||||
|
|
||||||
if (val) {
|
|
||||||
return val.split(',');
|
|
||||||
}
|
|
||||||
|
|
||||||
return [];
|
|
||||||
},
|
|
||||||
|
|
||||||
displayPreferencesKey: function () {
|
|
||||||
if (AppInfo.isNativeApp) {
|
|
||||||
return 'Emby Mobile';
|
|
||||||
}
|
|
||||||
|
|
||||||
return 'webclient';
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
})(window);
|
|
|
@ -1,4 +1,4 @@
|
||||||
define([], function () {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
// Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js
|
// Based on https://github.com/googlecast/CastVideos-chrome/blob/master/CastVideos.js
|
||||||
var currentResolve;
|
var currentResolve;
|
||||||
|
@ -350,7 +350,7 @@
|
||||||
receiverName: receiverName
|
receiverName: receiverName
|
||||||
});
|
});
|
||||||
|
|
||||||
var bitrateSetting = AppSettings.maxChromecastBitrate();
|
var bitrateSetting = appSettings.maxChromecastBitrate();
|
||||||
if (bitrateSetting) {
|
if (bitrateSetting) {
|
||||||
message.maxBitrate = bitrateSetting;
|
message.maxBitrate = bitrateSetting;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,22 +330,16 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="sessionUserInfo">';
|
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(session) + '</div>';
|
||||||
|
|
||||||
var userImage = DashboardPage.getUserImage(session);
|
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '</div>';
|
||||||
if (userImage) {
|
|
||||||
html += '<div class="sessionUserImage" data-src="' + userImage + '">';
|
|
||||||
html += '<img src="' + userImage + '" />';
|
|
||||||
} else {
|
|
||||||
html += '<div class="sessionUserImage">';
|
|
||||||
}
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '<div class="sessionUserName">';
|
//if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
|
||||||
html += DashboardPage.getUsersHtml(session);
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '</div>';
|
// html += '<div class="sessionTranscodingFramerate">' + session.TranscodingInfo.Framerate + ' fps</div>';
|
||||||
|
//} else {
|
||||||
|
// html += '<div class="sessionTranscodingFramerate"></div>';
|
||||||
|
//}
|
||||||
|
|
||||||
var nowPlayingName = DashboardPage.getNowPlayingName(session);
|
var nowPlayingName = DashboardPage.getNowPlayingName(session);
|
||||||
|
|
||||||
|
@ -372,33 +366,33 @@
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
html += '<div class="cardOverlayTarget">';
|
|
||||||
|
|
||||||
html += '<div class="sessionNowPlayingStreamInfo">' + DashboardPage.getSessionNowPlayingStreamInfo(session) + '</div>';
|
|
||||||
html += '<div class="sessionNowPlayingTime">' + DashboardPage.getSessionNowPlayingTime(session) + '</div>';
|
|
||||||
|
|
||||||
if (session.TranscodingInfo && session.TranscodingInfo.Framerate) {
|
|
||||||
|
|
||||||
html += '<div class="sessionTranscodingFramerate">' + session.TranscodingInfo.Framerate + ' fps</div>';
|
|
||||||
} else {
|
|
||||||
html += '<div class="sessionTranscodingFramerate"></div>';
|
|
||||||
}
|
|
||||||
html += '</div>';
|
|
||||||
|
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
// cardScalable
|
// cardScalable
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
|
html += '<div style="padding:1em;border-top:1px solid #eee;background:#fff;text-align:center;text-transform:uppercase;display:flex;align-items:center;justify-content:center;">';
|
||||||
|
|
||||||
|
var userImage = DashboardPage.getUserImage(session);
|
||||||
|
if (userImage) {
|
||||||
|
html += '<img style="border-radius:50px;margin-right:.5em;" src="' + userImage + '" />';
|
||||||
|
} else {
|
||||||
|
html += '<div style="height:24px;"></div>';
|
||||||
|
}
|
||||||
|
|
||||||
|
html += '<div class="sessionUserName">';
|
||||||
|
html += DashboardPage.getUsersHtml(session) || ' ';
|
||||||
|
html += '</div>';
|
||||||
|
html += '</div>';
|
||||||
|
|
||||||
// cardBox
|
// cardBox
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
// card
|
// card
|
||||||
html += '</div>';
|
html += '</div>';
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
parentElement.append(html).createSessionItemMenus().trigger('create');
|
parentElement.append(html);
|
||||||
|
|
||||||
$('.deadSession', parentElement).remove();
|
$('.deadSession', parentElement).remove();
|
||||||
},
|
},
|
||||||
|
@ -407,7 +401,7 @@
|
||||||
|
|
||||||
var html = '';
|
var html = '';
|
||||||
|
|
||||||
html += '<div>';
|
//html += '<div>';
|
||||||
|
|
||||||
if (session.TranscodingInfo && session.TranscodingInfo.IsAudioDirect && session.TranscodingInfo.IsVideoDirect) {
|
if (session.TranscodingInfo && session.TranscodingInfo.IsAudioDirect && session.TranscodingInfo.IsVideoDirect) {
|
||||||
html += Globalize.translate('LabelPlayMethodDirectStream');
|
html += Globalize.translate('LabelPlayMethodDirectStream');
|
||||||
|
@ -416,47 +410,47 @@
|
||||||
html += Globalize.translate('LabelPlayMethodTranscoding');
|
html += Globalize.translate('LabelPlayMethodTranscoding');
|
||||||
}
|
}
|
||||||
else if (session.PlayState.PlayMethod == 'DirectStream') {
|
else if (session.PlayState.PlayMethod == 'DirectStream') {
|
||||||
html += Globalize.translate('LabelPlayMethodDirectStream');
|
html += Globalize.translate('LabelPlayMethodDirectPlay');
|
||||||
}
|
}
|
||||||
else if (session.PlayState.PlayMethod == 'DirectPlay') {
|
else if (session.PlayState.PlayMethod == 'DirectPlay') {
|
||||||
html += Globalize.translate('LabelPlayMethodDirectPlay');
|
html += Globalize.translate('LabelPlayMethodDirectPlay');
|
||||||
}
|
}
|
||||||
|
|
||||||
html += '</div>';
|
//html += '</div>';
|
||||||
|
|
||||||
if (session.TranscodingInfo) {
|
//if (session.TranscodingInfo) {
|
||||||
|
|
||||||
html += '<br/>';
|
// html += '<br/>';
|
||||||
|
|
||||||
var line = [];
|
// var line = [];
|
||||||
|
|
||||||
if (session.TranscodingInfo.Container) {
|
// if (session.TranscodingInfo.Container) {
|
||||||
|
|
||||||
line.push(session.TranscodingInfo.Container);
|
// line.push(session.TranscodingInfo.Container);
|
||||||
}
|
// }
|
||||||
if (session.TranscodingInfo.Bitrate) {
|
// if (session.TranscodingInfo.Bitrate) {
|
||||||
|
|
||||||
if (session.TranscodingInfo.Bitrate > 1000000) {
|
// if (session.TranscodingInfo.Bitrate > 1000000) {
|
||||||
line.push((session.TranscodingInfo.Bitrate / 1000000).toFixed(1) + ' Mbps');
|
// line.push((session.TranscodingInfo.Bitrate / 1000000).toFixed(1) + ' Mbps');
|
||||||
} else {
|
// } else {
|
||||||
line.push(Math.floor(session.TranscodingInfo.Bitrate / 1000) + ' kbps');
|
// line.push(Math.floor(session.TranscodingInfo.Bitrate / 1000) + ' kbps');
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
if (line.length) {
|
// if (line.length) {
|
||||||
|
|
||||||
html += '<div>' + line.join(' ') + '</div>';
|
// html += '<div>' + line.join(' ') + '</div>';
|
||||||
}
|
// }
|
||||||
|
|
||||||
if (session.TranscodingInfo.VideoCodec) {
|
// if (session.TranscodingInfo.VideoCodec) {
|
||||||
|
|
||||||
html += '<div>' + Globalize.translate('LabelVideoCodec').replace('{0}', session.TranscodingInfo.VideoCodec) + '</div>';
|
// html += '<div>' + Globalize.translate('LabelVideoCodec').replace('{0}', session.TranscodingInfo.VideoCodec) + '</div>';
|
||||||
}
|
// }
|
||||||
if (session.TranscodingInfo.AudioCodec && session.TranscodingInfo.AudioCodec != session.TranscodingInfo.Container) {
|
// if (session.TranscodingInfo.AudioCodec && session.TranscodingInfo.AudioCodec != session.TranscodingInfo.Container) {
|
||||||
|
|
||||||
html += '<div>' + Globalize.translate('LabelAudioCodec').replace('{0}', session.TranscodingInfo.AudioCodec) + '</div>';
|
// html += '<div>' + Globalize.translate('LabelAudioCodec').replace('{0}', session.TranscodingInfo.AudioCodec) + '</div>';
|
||||||
}
|
// }
|
||||||
|
|
||||||
}
|
//}
|
||||||
|
|
||||||
return html;
|
return html;
|
||||||
},
|
},
|
||||||
|
@ -587,7 +581,7 @@
|
||||||
$('.sessionNowPlayingStreamInfo', row).html(DashboardPage.getSessionNowPlayingStreamInfo(session));
|
$('.sessionNowPlayingStreamInfo', row).html(DashboardPage.getSessionNowPlayingStreamInfo(session));
|
||||||
$('.sessionNowPlayingTime', row).html(DashboardPage.getSessionNowPlayingTime(session));
|
$('.sessionNowPlayingTime', row).html(DashboardPage.getSessionNowPlayingTime(session));
|
||||||
|
|
||||||
$('.sessionUserName', row).html(DashboardPage.getUsersHtml(session));
|
$('.sessionUserName', row).html(DashboardPage.getUsersHtml(session) || ' ');
|
||||||
|
|
||||||
$('.sessionAppSecondaryText', row).html(DashboardPage.getAppSecondaryText(session));
|
$('.sessionAppSecondaryText', row).html(DashboardPage.getAppSecondaryText(session));
|
||||||
|
|
||||||
|
@ -998,77 +992,6 @@
|
||||||
|
|
||||||
$(document).on('pageshow', "#dashboardPage", DashboardPage.onPageShow).on('pagebeforehide', "#dashboardPage", DashboardPage.onPageHide);
|
$(document).on('pageshow', "#dashboardPage", DashboardPage.onPageShow).on('pagebeforehide', "#dashboardPage", DashboardPage.onPageHide);
|
||||||
|
|
||||||
(function ($, document, window) {
|
|
||||||
|
|
||||||
var showOverlayTimeout;
|
|
||||||
|
|
||||||
function onHoverOut() {
|
|
||||||
|
|
||||||
if (showOverlayTimeout) {
|
|
||||||
clearTimeout(showOverlayTimeout);
|
|
||||||
showOverlayTimeout = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var elem = this.querySelector('.cardOverlayTarget');
|
|
||||||
|
|
||||||
if ($(elem).is(':visible')) {
|
|
||||||
require(["jquery", "velocity"], function ($, Velocity) {
|
|
||||||
|
|
||||||
Velocity.animate(elem, { "height": "0" },
|
|
||||||
{
|
|
||||||
complete: function () {
|
|
||||||
$(elem).hide();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$.fn.createSessionItemMenus = function () {
|
|
||||||
|
|
||||||
function onShowTimerExpired(elem) {
|
|
||||||
|
|
||||||
if ($('.itemSelectionPanel:visible', elem).length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
var innerElem = $('.cardOverlayTarget', elem);
|
|
||||||
|
|
||||||
innerElem.show().each(function () {
|
|
||||||
|
|
||||||
this.style.height = 0;
|
|
||||||
|
|
||||||
}).animate({ "height": "100%" }, "fast");
|
|
||||||
}
|
|
||||||
|
|
||||||
function onHoverIn() {
|
|
||||||
|
|
||||||
if (showOverlayTimeout) {
|
|
||||||
clearTimeout(showOverlayTimeout);
|
|
||||||
showOverlayTimeout = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
var elem = this;
|
|
||||||
|
|
||||||
showOverlayTimeout = setTimeout(function () {
|
|
||||||
|
|
||||||
onShowTimerExpired(elem);
|
|
||||||
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AppInfo.isTouchPreferred) {
|
|
||||||
/* browser with either Touch Events of Pointer Events
|
|
||||||
running on touch-capable device */
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
return this.off('mouseenter', '.playingSession', onHoverIn).off('mouseleave', '.playingSession', onHoverOut).on('mouseenter', '.playingSession', onHoverIn).on('mouseleave', '.playingSession', onHoverOut);
|
|
||||||
};
|
|
||||||
|
|
||||||
})(jQuery, document, window);
|
|
||||||
|
|
||||||
|
|
||||||
(function ($, document, window) {
|
(function ($, document, window) {
|
||||||
|
|
||||||
function getEntryHtml(entry) {
|
function getEntryHtml(entry) {
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
define(['paper-slider', 'paper-button'], function () {
|
define(['appSettings', 'paper-slider', 'paper-button'], function (appSettings) {
|
||||||
|
|
||||||
function getDeviceProfile(serverAddress, deviceId, item, startPositionTicks, maxBitrate, mediaSourceId, audioStreamIndex, subtitleStreamIndex) {
|
function getDeviceProfile(serverAddress, deviceId, item, startPositionTicks, maxBitrate, mediaSourceId, audioStreamIndex, subtitleStreamIndex) {
|
||||||
|
|
||||||
var bitrateSetting = AppSettings.maxStreamingBitrate();
|
var bitrateSetting = appSettings.maxStreamingBitrate();
|
||||||
|
|
||||||
var profile = {};
|
var profile = {};
|
||||||
|
|
||||||
|
|
|
@ -102,16 +102,10 @@
|
||||||
|
|
||||||
return new Promise(function (resolve, reject) {
|
return new Promise(function (resolve, reject) {
|
||||||
|
|
||||||
if (AppInfo.isNativeApp) {
|
if (Dashboard.isConnectMode()) {
|
||||||
|
|
||||||
resolve(navigator.language || navigator.userLanguage);
|
resolve(navigator.language || navigator.userLanguage);
|
||||||
|
|
||||||
} else if (AppInfo.supportsUserDisplayLanguageSetting) {
|
|
||||||
|
|
||||||
console.log('AppInfo.supportsUserDisplayLanguageSetting is true');
|
|
||||||
|
|
||||||
resolve(AppSettings.displayLanguage());
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
console.log('Getting culture from document');
|
console.log('Getting culture from document');
|
||||||
|
|
|
@ -132,12 +132,20 @@
|
||||||
var homePageDismissValue = '14';
|
var homePageDismissValue = '14';
|
||||||
var homePageTourKey = 'homePageTour';
|
var homePageTourKey = 'homePageTour';
|
||||||
|
|
||||||
|
function displayPreferencesKey() {
|
||||||
|
if (AppInfo.isNativeApp) {
|
||||||
|
return 'Emby Mobile';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'webclient';
|
||||||
|
}
|
||||||
|
|
||||||
function dismissWelcome(page, userId) {
|
function dismissWelcome(page, userId) {
|
||||||
|
|
||||||
getDisplayPreferences('home', userId).then(function (result) {
|
getDisplayPreferences('home', userId).then(function (result) {
|
||||||
|
|
||||||
result.CustomPrefs[homePageTourKey] = homePageDismissValue;
|
result.CustomPrefs[homePageTourKey] = homePageDismissValue;
|
||||||
ApiClient.updateDisplayPreferences('home', result, userId, AppSettings.displayPreferencesKey());
|
ApiClient.updateDisplayPreferences('home', result, userId, displayPreferencesKey());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +324,7 @@
|
||||||
|
|
||||||
function getDisplayPreferences(key, userId) {
|
function getDisplayPreferences(key, userId) {
|
||||||
|
|
||||||
return ApiClient.getDisplayPreferences(key, userId, AppSettings.displayPreferencesKey());
|
return ApiClient.getDisplayPreferences(key, userId, displayPreferencesKey());
|
||||||
}
|
}
|
||||||
|
|
||||||
window.HomePage = {
|
window.HomePage = {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
define(['playlistManager'], function (playlistManager) {
|
define(['playlistManager', 'appSettings'], function (playlistManager, appSettings) {
|
||||||
|
|
||||||
var libraryBrowser = (function (window, document, screen) {
|
var libraryBrowser = (function (window, document, screen) {
|
||||||
|
|
||||||
|
@ -666,7 +666,7 @@
|
||||||
|
|
||||||
showPlayMenu: function (positionTo, itemId, itemType, isFolder, mediaType, resumePositionTicks) {
|
showPlayMenu: function (positionTo, itemId, itemType, isFolder, mediaType, resumePositionTicks) {
|
||||||
|
|
||||||
var externalPlayers = AppInfo.supportsExternalPlayers && AppSettings.enableExternalPlayers();
|
var externalPlayers = AppInfo.supportsExternalPlayers && appSettings.enableExternalPlayers();
|
||||||
|
|
||||||
if (!resumePositionTicks && mediaType != "Audio" && !isFolder) {
|
if (!resumePositionTicks && mediaType != "Audio" && !isFolder) {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(function ($, document, window) {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
var showOverlayTimeout;
|
var showOverlayTimeout;
|
||||||
|
|
||||||
|
@ -338,7 +338,7 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mediaType == 'Video' && AppInfo.supportsExternalPlayers && AppSettings.enableExternalPlayers()) {
|
if (mediaType == 'Video' && AppInfo.supportsExternalPlayers && appSettings.enableExternalPlayers()) {
|
||||||
items.push({
|
items.push({
|
||||||
name: Globalize.translate('ButtonPlayExternalPlayer'),
|
name: Globalize.translate('ButtonPlayExternalPlayer'),
|
||||||
id: 'externalplayer',
|
id: 'externalplayer',
|
||||||
|
@ -1496,4 +1496,4 @@
|
||||||
Events.on(ConnectionManager, 'localusersignedin', clearRefreshTimes);
|
Events.on(ConnectionManager, 'localusersignedin', clearRefreshTimes);
|
||||||
Events.on(ConnectionManager, 'localusersignedout', clearRefreshTimes);
|
Events.on(ConnectionManager, 'localusersignedout', clearRefreshTimes);
|
||||||
|
|
||||||
})(jQuery, document, window);
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
(function () {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
var syncPromise;
|
var syncPromise;
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
|
|
||||||
LocalSync.normalizeSyncOptions(options);
|
LocalSync.normalizeSyncOptions(options);
|
||||||
|
|
||||||
options.cameraUploadServers = AppSettings.cameraUploadServers();
|
options.cameraUploadServers = appSettings.cameraUploadServers();
|
||||||
|
|
||||||
syncPromise = new MediaBrowser.MultiServerSync(ConnectionManager).sync(options).then(function () {
|
syncPromise = new MediaBrowser.MultiServerSync(ConnectionManager).sync(options).then(function () {
|
||||||
|
|
||||||
|
@ -50,4 +50,5 @@
|
||||||
return 'Idle';
|
return 'Idle';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
})();
|
|
||||||
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
(function () {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
function createVideoPlayer(self) {
|
function createVideoPlayer(self) {
|
||||||
|
|
||||||
|
@ -152,7 +152,7 @@
|
||||||
})[0];
|
})[0];
|
||||||
var videoWidth = videoStream ? videoStream.Width : null;
|
var videoWidth = videoStream ? videoStream.Width : null;
|
||||||
|
|
||||||
var options = qualityoptions.getVideoQualityOptions(AppSettings.maxStreamingBitrate(), videoWidth);
|
var options = qualityoptions.getVideoQualityOptions(appSettings.maxStreamingBitrate(), videoWidth);
|
||||||
|
|
||||||
if (isStatic) {
|
if (isStatic) {
|
||||||
options[0].name = "Direct";
|
options[0].name = "Direct";
|
||||||
|
@ -602,8 +602,8 @@
|
||||||
|
|
||||||
self.onQualityOptionSelected = function (bitrate) {
|
self.onQualityOptionSelected = function (bitrate) {
|
||||||
|
|
||||||
AppSettings.maxStreamingBitrate(bitrate);
|
appSettings.maxStreamingBitrate(bitrate);
|
||||||
AppSettings.enableAutomaticBitrateDetection(false);
|
appSettings.enableAutomaticBitrateDetection(false);
|
||||||
|
|
||||||
self.changeStream(self.getCurrentTicks(), {
|
self.changeStream(self.getCurrentTicks(), {
|
||||||
Bitrate: bitrate
|
Bitrate: bitrate
|
||||||
|
@ -1271,4 +1271,4 @@
|
||||||
|
|
||||||
createVideoPlayer(MediaPlayer);
|
createVideoPlayer(MediaPlayer);
|
||||||
|
|
||||||
})();
|
});
|
|
@ -1,4 +1,4 @@
|
||||||
(function (document, setTimeout, clearTimeout, screen, setInterval, window) {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
function mediaPlayer() {
|
function mediaPlayer() {
|
||||||
|
|
||||||
|
@ -189,7 +189,7 @@
|
||||||
|
|
||||||
require(['browserdeviceprofile', 'qualityoptions'], function (profile, qualityoptions) {
|
require(['browserdeviceprofile', 'qualityoptions'], function (profile, qualityoptions) {
|
||||||
|
|
||||||
var bitrateSetting = AppSettings.maxStreamingBitrate();
|
var bitrateSetting = appSettings.maxStreamingBitrate();
|
||||||
|
|
||||||
if (!maxHeight) {
|
if (!maxHeight) {
|
||||||
maxHeight = qualityoptions.getVideoQualityOptions(bitrateSetting).filter(function (q) {
|
maxHeight = qualityoptions.getVideoQualityOptions(bitrateSetting).filter(function (q) {
|
||||||
|
@ -600,7 +600,7 @@
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.startPositionTicks || firstItem.MediaType !== 'Video' || !AppSettings.enableCinemaMode()) {
|
if (options.startPositionTicks || firstItem.MediaType !== 'Video' || !appSettings.enableCinemaMode()) {
|
||||||
|
|
||||||
self.playInternal(firstItem, options.startPositionTicks, function () {
|
self.playInternal(firstItem, options.startPositionTicks, function () {
|
||||||
self.setPlaylistState(0, items);
|
self.setPlaylistState(0, items);
|
||||||
|
@ -825,14 +825,14 @@
|
||||||
|
|
||||||
var bitrateDetectionKey = ApiClient.serverAddress();
|
var bitrateDetectionKey = ApiClient.serverAddress();
|
||||||
|
|
||||||
if (item.MediaType == 'Video' && AppSettings.enableAutomaticBitrateDetection() && (new Date().getTime() - (self.lastBitrateDetections[bitrateDetectionKey] || 0)) > 300000) {
|
if (item.MediaType == 'Video' && appSettings.enableAutomaticBitrateDetection() && (new Date().getTime() - (self.lastBitrateDetections[bitrateDetectionKey] || 0)) > 300000) {
|
||||||
|
|
||||||
Dashboard.showLoadingMsg();
|
Dashboard.showLoadingMsg();
|
||||||
|
|
||||||
ApiClient.detectBitrate().then(function (bitrate) {
|
ApiClient.detectBitrate().then(function (bitrate) {
|
||||||
console.log('Max bitrate auto detected to ' + bitrate);
|
console.log('Max bitrate auto detected to ' + bitrate);
|
||||||
self.lastBitrateDetections[bitrateDetectionKey] = new Date().getTime();
|
self.lastBitrateDetections[bitrateDetectionKey] = new Date().getTime();
|
||||||
AppSettings.maxStreamingBitrate(bitrate);
|
appSettings.maxStreamingBitrate(bitrate);
|
||||||
|
|
||||||
onBitrateDetected();
|
onBitrateDetected();
|
||||||
|
|
||||||
|
@ -1732,5 +1732,4 @@
|
||||||
window.MediaController.registerPlayer(window.MediaPlayer);
|
window.MediaController.registerPlayer(window.MediaPlayer);
|
||||||
window.MediaController.setActivePlayer(window.MediaPlayer, window.MediaPlayer.getTargetsInternal()[0]);
|
window.MediaController.setActivePlayer(window.MediaPlayer, window.MediaPlayer.getTargetsInternal()[0]);
|
||||||
|
|
||||||
|
});
|
||||||
})(document, setTimeout, clearTimeout, screen, setInterval, window);
|
|
|
@ -9,8 +9,6 @@
|
||||||
$('#selectThemeSong', page).val(appStorage.getItem('enableThemeSongs-' + user.Id) || '');
|
$('#selectThemeSong', page).val(appStorage.getItem('enableThemeSongs-' + user.Id) || '');
|
||||||
$('#selectBackdrop', page).val(appStorage.getItem('enableBackdrops-' + user.Id) || '');
|
$('#selectBackdrop', page).val(appStorage.getItem('enableBackdrops-' + user.Id) || '');
|
||||||
|
|
||||||
$('#selectLanguage', page).val(AppSettings.displayLanguage());
|
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,8 +18,6 @@
|
||||||
user.Configuration.DisplayUnairedEpisodes = page.querySelector('.chkDisplayUnairedEpisodes').checked;
|
user.Configuration.DisplayUnairedEpisodes = page.querySelector('.chkDisplayUnairedEpisodes').checked;
|
||||||
user.Configuration.GroupMoviesIntoBoxSets = page.querySelector('.chkGroupMoviesIntoCollections').checked;
|
user.Configuration.GroupMoviesIntoBoxSets = page.querySelector('.chkGroupMoviesIntoCollections').checked;
|
||||||
|
|
||||||
AppSettings.displayLanguage(page.querySelector('#selectLanguage').value);
|
|
||||||
|
|
||||||
appStorage.setItem('enableThemeSongs-' + user.Id, $('#selectThemeSong', page).val());
|
appStorage.setItem('enableThemeSongs-' + user.Id, $('#selectThemeSong', page).val());
|
||||||
appStorage.setItem('enableBackdrops-' + user.Id, $('#selectBackdrop', page).val());
|
appStorage.setItem('enableBackdrops-' + user.Id, $('#selectBackdrop', page).val());
|
||||||
|
|
||||||
|
@ -98,12 +94,6 @@
|
||||||
|
|
||||||
$('.fldEnableBackdrops', page).show();
|
$('.fldEnableBackdrops', page).show();
|
||||||
|
|
||||||
if (AppInfo.supportsUserDisplayLanguageSetting) {
|
|
||||||
$('.languageSection', page).show();
|
|
||||||
} else {
|
|
||||||
$('.languageSection', page).hide();
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
pageIdOn('pagebeforehide', "displayPreferencesPage", function () {
|
pageIdOn('pagebeforehide', "displayPreferencesPage", function () {
|
||||||
|
|
||||||
|
|
|
@ -154,6 +154,13 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function displayPreferencesKey() {
|
||||||
|
if (AppInfo.isNativeApp) {
|
||||||
|
return 'Emby Mobile';
|
||||||
|
}
|
||||||
|
|
||||||
|
return 'webclient';
|
||||||
|
}
|
||||||
function saveUser(page, user, displayPreferences) {
|
function saveUser(page, user, displayPreferences) {
|
||||||
|
|
||||||
user.Configuration.DisplayCollectionsView = page.querySelector('.chkDisplayCollectionView').checked;
|
user.Configuration.DisplayCollectionsView = page.querySelector('.chkDisplayCollectionView').checked;
|
||||||
|
@ -200,7 +207,7 @@
|
||||||
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
displayPreferences.CustomPrefs.home2 = $('#selectHomeSection3', page).val();
|
||||||
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
|
displayPreferences.CustomPrefs.home3 = $('#selectHomeSection4', page).val();
|
||||||
|
|
||||||
return ApiClient.updateDisplayPreferences('home', displayPreferences, user.Id, AppSettings.displayPreferencesKey()).then(function () {
|
return ApiClient.updateDisplayPreferences('home', displayPreferences, user.Id, displayPreferencesKey()).then(function () {
|
||||||
|
|
||||||
return ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
return ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
});
|
});
|
||||||
|
@ -218,7 +225,7 @@
|
||||||
|
|
||||||
ApiClient.getUser(userId).then(function (user) {
|
ApiClient.getUser(userId).then(function (user) {
|
||||||
|
|
||||||
ApiClient.getDisplayPreferences('home', user.Id, AppSettings.displayPreferencesKey()).then(function (displayPreferences) {
|
ApiClient.getDisplayPreferences('home', user.Id, displayPreferencesKey()).then(function (displayPreferences) {
|
||||||
|
|
||||||
saveUser(page, user, displayPreferences).then(function () {
|
saveUser(page, user, displayPreferences).then(function () {
|
||||||
|
|
||||||
|
@ -308,7 +315,7 @@
|
||||||
|
|
||||||
ApiClient.getUser(userId).then(function (user) {
|
ApiClient.getUser(userId).then(function (user) {
|
||||||
|
|
||||||
ApiClient.getDisplayPreferences('home', user.Id, AppSettings.displayPreferencesKey()).then(function (result) {
|
ApiClient.getDisplayPreferences('home', user.Id, displayPreferencesKey()).then(function (result) {
|
||||||
|
|
||||||
loadForm(page, user, result);
|
loadForm(page, user, result);
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
(function ($, window, document) {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
function populateLanguages(select, languages) {
|
function populateLanguages(select, languages) {
|
||||||
|
|
||||||
|
@ -31,12 +31,12 @@
|
||||||
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
|
$('#selectSubtitlePlaybackMode', page).val(user.Configuration.SubtitleMode || "").trigger('change');
|
||||||
|
|
||||||
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
page.querySelector('.chkPlayDefaultAudioTrack').checked = user.Configuration.PlayDefaultAudioTrack || false;
|
||||||
page.querySelector('.chkEnableCinemaMode').checked = AppSettings.enableCinemaMode();
|
page.querySelector('.chkEnableCinemaMode').checked = appSettings.enableCinemaMode();
|
||||||
page.querySelector('.chkExternalVideoPlayer').checked = AppSettings.enableExternalPlayers();
|
page.querySelector('.chkExternalVideoPlayer').checked = appSettings.enableExternalPlayers();
|
||||||
|
|
||||||
require(['qualityoptions'], function (qualityoptions) {
|
require(['qualityoptions'], function (qualityoptions) {
|
||||||
|
|
||||||
var bitrateOptions = qualityoptions.getVideoQualityOptions(AppSettings.maxStreamingBitrate()).map(function (i) {
|
var bitrateOptions = qualityoptions.getVideoQualityOptions(appSettings.maxStreamingBitrate()).map(function (i) {
|
||||||
|
|
||||||
return '<option value="' + i.bitrate + '">' + i.name + '</option>';
|
return '<option value="' + i.bitrate + '">' + i.name + '</option>';
|
||||||
|
|
||||||
|
@ -47,13 +47,13 @@
|
||||||
$('#selectMaxBitrate', page).html(bitrateOptions);
|
$('#selectMaxBitrate', page).html(bitrateOptions);
|
||||||
$('#selectMaxChromecastBitrate', page).html(bitrateOptions);
|
$('#selectMaxChromecastBitrate', page).html(bitrateOptions);
|
||||||
|
|
||||||
if (AppSettings.enableAutomaticBitrateDetection()) {
|
if (appSettings.enableAutomaticBitrateDetection()) {
|
||||||
$('#selectMaxBitrate', page).val('');
|
$('#selectMaxBitrate', page).val('');
|
||||||
} else {
|
} else {
|
||||||
$('#selectMaxBitrate', page).val(AppSettings.maxStreamingBitrate());
|
$('#selectMaxBitrate', page).val(appSettings.maxStreamingBitrate());
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#selectMaxChromecastBitrate', page).val(AppSettings.maxChromecastBitrate());
|
$('#selectMaxChromecastBitrate', page).val(appSettings.maxChromecastBitrate());
|
||||||
|
|
||||||
Dashboard.hideLoadingMsg();
|
Dashboard.hideLoadingMsg();
|
||||||
});
|
});
|
||||||
|
@ -95,23 +95,23 @@
|
||||||
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
|
user.Configuration.SubtitleMode = $('#selectSubtitlePlaybackMode', page).val();
|
||||||
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
|
user.Configuration.PlayDefaultAudioTrack = page.querySelector('.chkPlayDefaultAudioTrack').checked;
|
||||||
user.Configuration.EnableNextEpisodeAutoPlay = page.querySelector('.chkEpisodeAutoPlay').checked;
|
user.Configuration.EnableNextEpisodeAutoPlay = page.querySelector('.chkEpisodeAutoPlay').checked;
|
||||||
|
appSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
||||||
AppSettings.enableCinemaMode(page.querySelector('.chkEnableCinemaMode').checked);
|
|
||||||
|
|
||||||
return ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
return ApiClient.updateUserConfiguration(user.Id, user.Configuration);
|
||||||
}
|
}
|
||||||
|
|
||||||
function save(page) {
|
function save(page) {
|
||||||
AppSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
|
|
||||||
|
appSettings.enableExternalPlayers(page.querySelector('.chkExternalVideoPlayer').checked);
|
||||||
|
|
||||||
if ($('#selectMaxBitrate', page).val()) {
|
if ($('#selectMaxBitrate', page).val()) {
|
||||||
AppSettings.maxStreamingBitrate($('#selectMaxBitrate', page).val());
|
appSettings.maxStreamingBitrate($('#selectMaxBitrate', page).val());
|
||||||
AppSettings.enableAutomaticBitrateDetection(false);
|
appSettings.enableAutomaticBitrateDetection(false);
|
||||||
} else {
|
} else {
|
||||||
AppSettings.enableAutomaticBitrateDetection(true);
|
appSettings.enableAutomaticBitrateDetection(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
AppSettings.maxChromecastBitrate($('#selectMaxChromecastBitrate', page).val());
|
appSettings.maxChromecastBitrate($('#selectMaxChromecastBitrate', page).val());
|
||||||
|
|
||||||
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
var userId = getParameterByName('userId') || Dashboard.getCurrentUserId();
|
||||||
|
|
||||||
|
@ -196,4 +196,4 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
});
|
|
@ -1,11 +1,11 @@
|
||||||
(function ($, window, document) {
|
define(['appSettings'], function (appSettings) {
|
||||||
|
|
||||||
function loadForm(page, user) {
|
function loadForm(page, user) {
|
||||||
|
|
||||||
page.querySelector('#txtSyncPath').value = AppSettings.syncPath();
|
page.querySelector('#txtSyncPath').value = appSettings.syncPath();
|
||||||
page.querySelector('#chkWifi').checked = AppSettings.syncOnlyOnWifi();
|
page.querySelector('#chkWifi').checked = appSettings.syncOnlyOnWifi();
|
||||||
|
|
||||||
var uploadServers = AppSettings.cameraUploadServers();
|
var uploadServers = appSettings.cameraUploadServers();
|
||||||
|
|
||||||
page.querySelector('.uploadServerList').innerHTML = ConnectionManager.getSavedServers().map(function (s) {
|
page.querySelector('.uploadServerList').innerHTML = ConnectionManager.getSavedServers().map(function (s) {
|
||||||
|
|
||||||
|
@ -21,10 +21,10 @@
|
||||||
|
|
||||||
function saveUser(page, user) {
|
function saveUser(page, user) {
|
||||||
|
|
||||||
AppSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
appSettings.syncPath(page.querySelector('#txtSyncPath').value);
|
||||||
AppSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
appSettings.syncOnlyOnWifi(page.querySelector('#chkWifi').checked);
|
||||||
|
|
||||||
AppSettings.cameraUploadServers($(".chkUploadServer", page).get().filter(function (i) {
|
appSettings.cameraUploadServers($(".chkUploadServer", page).get().filter(function (i) {
|
||||||
|
|
||||||
return i.checked;
|
return i.checked;
|
||||||
|
|
||||||
|
@ -92,4 +92,4 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
})(jQuery, window, document);
|
});
|
|
@ -1500,7 +1500,6 @@ var AppInfo = {};
|
||||||
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
AppInfo.enableBackButton = isIOS && (window.navigator.standalone || AppInfo.isNativeApp);
|
||||||
|
|
||||||
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
|
AppInfo.supportsSyncPathSetting = isCordova && isAndroid;
|
||||||
AppInfo.supportsUserDisplayLanguageSetting = Dashboard.isConnectMode() && !isCordova;
|
|
||||||
|
|
||||||
if (isCordova && isIOS) {
|
if (isCordova && isIOS) {
|
||||||
AppInfo.moreIcon = 'more-horiz';
|
AppInfo.moreIcon = 'more-horiz';
|
||||||
|
@ -1903,6 +1902,8 @@ var AppInfo = {};
|
||||||
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
define("toast", [embyWebComponentsBowerPath + "/toast/toast"], returnFirstDependency);
|
||||||
define("scrollHelper", [embyWebComponentsBowerPath + "/scrollhelper"], returnFirstDependency);
|
define("scrollHelper", [embyWebComponentsBowerPath + "/scrollhelper"], returnFirstDependency);
|
||||||
|
|
||||||
|
define("appSettings", [embyWebComponentsBowerPath + "/appsettings"], updateAppSettings);
|
||||||
|
|
||||||
// alias
|
// alias
|
||||||
define("historyManager", [], function () {
|
define("historyManager", [], function () {
|
||||||
return {
|
return {
|
||||||
|
@ -1935,6 +1936,39 @@ var AppInfo = {};
|
||||||
define('dialogText', ['globalize'], getDialogText());
|
define('dialogText', ['globalize'], getDialogText());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function updateAppSettings(appSettings) {
|
||||||
|
|
||||||
|
appSettings.enableExternalPlayers = function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
appSettings.set('externalplayers', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
return appSettings.get('externalplayers') == 'true';
|
||||||
|
};
|
||||||
|
|
||||||
|
appSettings.enableCinemaMode = function (val) {
|
||||||
|
|
||||||
|
if (val != null) {
|
||||||
|
appSettings.set('enableCinemaMode', val.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
val = appSettings.get('enableCinemaMode');
|
||||||
|
|
||||||
|
if (val) {
|
||||||
|
return val != 'false';
|
||||||
|
}
|
||||||
|
|
||||||
|
if (browserInfo.mobile) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
};
|
||||||
|
|
||||||
|
return appSettings;
|
||||||
|
}
|
||||||
|
|
||||||
function getDialogText() {
|
function getDialogText() {
|
||||||
return function (globalize) {
|
return function (globalize) {
|
||||||
return {
|
return {
|
||||||
|
@ -2067,7 +2101,6 @@ var AppInfo = {};
|
||||||
deps.push('connectionmanagerfactory');
|
deps.push('connectionmanagerfactory');
|
||||||
deps.push('credentialprovider');
|
deps.push('credentialprovider');
|
||||||
|
|
||||||
deps.push('scripts/appsettings');
|
|
||||||
deps.push('scripts/extensions');
|
deps.push('scripts/extensions');
|
||||||
|
|
||||||
require(deps, function (connectionManagerExports, credentialProviderFactory) {
|
require(deps, function (connectionManagerExports, credentialProviderFactory) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue