mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
added modular configuration
This commit is contained in:
parent
0a3876a9b1
commit
6c602e1ad7
5 changed files with 72 additions and 39 deletions
|
@ -1310,6 +1310,17 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
self.getNamedConfiguration = function (name) {
|
||||
|
||||
var url = self.getUrl("System/Configuration/" + name);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the server's scheduled tasks
|
||||
|
@ -2393,6 +2404,22 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
self.updateNamedConfiguration = function (name, configuration) {
|
||||
|
||||
if (!configuration) {
|
||||
throw new Error("null configuration");
|
||||
}
|
||||
|
||||
var url = self.getUrl("System/Configuration/" + name);
|
||||
|
||||
return self.ajax({
|
||||
type: "POST",
|
||||
url: url,
|
||||
data: JSON.stringify(configuration),
|
||||
contentType: "application/json"
|
||||
});
|
||||
};
|
||||
|
||||
self.updateItem = function (item) {
|
||||
|
||||
if (!item) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue