mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #849 from dkanada/error
Catch some errors and remove unused method
This commit is contained in:
commit
7d558dbc7e
3 changed files with 13 additions and 18 deletions
|
@ -56,6 +56,12 @@ define(["jQuery", "loading", "fnchecked", "emby-checkbox", "emby-textarea", "emb
|
|||
}
|
||||
});
|
||||
});
|
||||
}, function () {
|
||||
require(["alert"], function (alert) {
|
||||
alert(globalize.translate("DefaultErrorMessage"));
|
||||
});
|
||||
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
});
|
||||
return false;
|
||||
|
|
|
@ -66,6 +66,12 @@ define(["jQuery", "loading", "globalize", "dom", "libraryMenu"], function ($, lo
|
|||
config.EnableHardwareEncoding = form.querySelector("#chkHardwareEncoding").checked;
|
||||
ApiClient.updateNamedConfiguration("encoding", config).then(function () {
|
||||
updateEncoder(form);
|
||||
}, function () {
|
||||
require(["alert"], function (alert) {
|
||||
alert(globalize.translate("DefaultErrorMessage"));
|
||||
});
|
||||
|
||||
Dashboard.processServerConfigurationUpdateResult();
|
||||
});
|
||||
});
|
||||
};
|
||||
|
|
|
@ -13,6 +13,7 @@ define(["jQuery", "libraryMenu", "loading"], function ($, libraryMenu, loading)
|
|||
config.RemoteClientBitrateLimit = parseInt(1e6 * parseFloat($("#txtRemoteClientBitrateLimit", form).val() || "0"));
|
||||
ApiClient.updateServerConfiguration(config).then(Dashboard.processServerConfigurationUpdateResult);
|
||||
});
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -30,24 +31,6 @@ define(["jQuery", "libraryMenu", "loading"], function ($, libraryMenu, loading)
|
|||
}
|
||||
|
||||
$(document).on("pageinit", "#streamingSettingsPage", function () {
|
||||
var page = this;
|
||||
$("#btnSelectTranscodingTempPath", page).on("click.selectDirectory", function () {
|
||||
require(["directorybrowser"], function (directoryBrowser) {
|
||||
var picker = new directoryBrowser();
|
||||
picker.show({
|
||||
callback: function (path) {
|
||||
if (path) {
|
||||
$("#txtTranscodingTempPath", page).val(path);
|
||||
}
|
||||
|
||||
picker.close();
|
||||
},
|
||||
validateWriteable: true,
|
||||
header: Globalize.translate("HeaderSelectTranscodingPath"),
|
||||
instruction: Globalize.translate("HeaderSelectTranscodingPathHelp")
|
||||
});
|
||||
});
|
||||
});
|
||||
$(".streamingSettingsForm").off("submit", onSubmit).on("submit", onSubmit);
|
||||
}).on("pageshow", "#streamingSettingsPage", function () {
|
||||
loading.show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue