mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added a new encoding settings page under advanced
This commit is contained in:
parent
231ed3c315
commit
2704b52493
16 changed files with 267 additions and 136 deletions
50
dashboard-ui/scripts/encodingsettings.js
Normal file
50
dashboard-ui/scripts/encodingsettings.js
Normal file
|
@ -0,0 +1,50 @@
|
|||
(function ($, document, window) {
|
||||
|
||||
function loadPage(page, config) {
|
||||
|
||||
$('#chkEnableDebugEncodingLogging', page).checked(config.EnableDebugEncodingLogging).checkboxradio('refresh');
|
||||
|
||||
$('.radioEncodingQuality', page).each(function() {
|
||||
|
||||
this.checked = config.MediaEncodingQuality == this.value;
|
||||
|
||||
}).checkboxradio('refresh');
|
||||
|
||||
Dashboard.hideLoadingMsg();
|
||||
}
|
||||
|
||||
$(document).on('pageshow', "#encodingSettingsPage", function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var page = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function(config) {
|
||||
|
||||
loadPage(page, config);
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
window.EncodingSettingsPage = {
|
||||
|
||||
onSubmit: function () {
|
||||
|
||||
Dashboard.showLoadingMsg();
|
||||
|
||||
var form = this;
|
||||
|
||||
ApiClient.getServerConfiguration().done(function (config) {
|
||||
|
||||
config.EnableDebugEncodingLogging = $('#chkEnableDebugEncodingLogging', form).checked();
|
||||
config.MediaEncodingQuality = $('.radioEncodingQuality:checked', form).val();
|
||||
|
||||
ApiClient.updateServerConfiguration(config).done(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
// Disable default form submission
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery, document, window);
|
Loading…
Add table
Add a link
Reference in a new issue