mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
add more methods to file system interface
This commit is contained in:
parent
2861ff68c9
commit
7743b36bc9
46 changed files with 421 additions and 504 deletions
41
ApiClient.js
41
ApiClient.js
|
@ -872,6 +872,47 @@ MediaBrowser.ApiClient = function ($, navigator, JSON, WebSocket, setTimeout, wi
|
|||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets shares from a network device
|
||||
*/
|
||||
self.getNetworkShares = function (path) {
|
||||
|
||||
if (!path) {
|
||||
throw new Error("null path");
|
||||
}
|
||||
|
||||
var options = {};
|
||||
options.path = path;
|
||||
|
||||
var url = self.getUrl("Environment/NetworkShares", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url,
|
||||
dataType: "json"
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the parent of a given path
|
||||
*/
|
||||
self.getParentPath = function (path) {
|
||||
|
||||
if (!path) {
|
||||
throw new Error("null path");
|
||||
}
|
||||
|
||||
var options = {};
|
||||
options.path = path;
|
||||
|
||||
var url = self.getUrl("Environment/ParentPath", options);
|
||||
|
||||
return self.ajax({
|
||||
type: "GET",
|
||||
url: url
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets a list of physical drives from the server
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue