1
0
Fork 0
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:
Luke Pulverenti 2014-06-29 13:35:05 -04:00
parent 0a3876a9b1
commit 6c602e1ad7
5 changed files with 72 additions and 39 deletions

View file

@ -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) {