mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add cinema mode feature
This commit is contained in:
parent
42f0520499
commit
f03d5f6fd2
28 changed files with 327 additions and 89 deletions
51
dashboard-ui/scripts/playbackconfiguration.js
Normal file
51
dashboard-ui/scripts/playbackconfiguration.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
$('#txtMinResumePct', page).val(config.MinResumePct);
|
||||
$('#txtMaxResumePct', page).val(config.MaxResumePct);
|
||||
$('#txtMinResumeDuration', page).val(config.MinResumeDurationSeconds);
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#playbackConfigurationPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function playbackConfigurationPage() {
|
||||
|
||||
var self = this;
|
||||
|
||||
self.onSubmit = function () {
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var form = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.MinResumePct = $('#txtMinResumePct', form).val();
|
||||
config.MaxResumePct = $('#txtMaxResumePct', form).val();
|
||||
config.MinResumeDurationSeconds = $('#txtMinResumeDuration', form).val();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
};
|
||||
}
|
||||
|
||||
window.PlaybackConfigurationPage = new playbackConfigurationPage();
|
||||
|
||||
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue