mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge remote-tracking branch 'upstream/master' into global-globalize
This commit is contained in:
commit
0117bf476a
94 changed files with 1215 additions and 469 deletions
43
src/controllers/dashboard/streamingsettings.js
Normal file
43
src/controllers/dashboard/streamingsettings.js
Normal file
|
@ -0,0 +1,43 @@
|
|||
define(["jQuery", "libraryMenu", "loading", "globalize"], function ($, libraryMenu, loading, globalize) {
|
||||
"use strict";
|
||||
|
||||
function loadPage(page, config) {
|
||||
$("#txtRemoteClientBitrateLimit", page).val(config.RemoteClientBitrateLimit / 1e6 || "");
|
||||
loading.hide();
|
||||
}
|
||||
|
||||
function onSubmit() {
|
||||
loading.show();
|
||||
var form = this;
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
config.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($("#txtRemoteClientBitrateLimit", form).val() || "0"));
|
||||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function getTabs() {
|
||||
return [{
|
||||
href: "encodingsettings.html",
|
||||
name: globalize.translate("Transcoding")
|
||||
}, {
|
||||
href: "playbackconfiguration.html",
|
||||
name: globalize.translate("TabResumeSettings")
|
||||
}, {
|
||||
href: "streamingsettings.html",
|
||||
name: globalize.translate("TabStreaming")
|
||||
}];
|
||||
}
|
||||
|
||||
$(document).on("pageinit", "#streamingSettingsPage", function () {
|
||||
$(".streamingSettingsForm").off("submit", onSubmit).on("submit", onSubmit);
|
||||
}).on("pageshow", "#streamingSettingsPage", function () {
|
||||
loading.show();
|
||||
libraryMenu.setTabs("playback", 2, getTabs);
|
||||
var page = this;
|
||||
ApiClient.getServerConfiguration().then(function (config) {
|
||||
loadPage(page, config);
|
||||
});
|
||||
});
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue