1
0
Fork 0
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:
dkanada 2020-02-25 22:28:05 +09:00 committed by GitHub
commit 7d558dbc7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 18 deletions

View file

@ -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;

View file

@ -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();
});
});
};

View file

@ -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();