diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-28 12:37:42 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-03-28 12:37:42 +0100 |
commit | 7c1309ea483b21cb2f97a509b61cb3363de8edb8 (patch) | |
tree | 1fe9a481aa7bac344b331519f954e1c7dbe2d283 /module/api | |
parent | working reset button for config (diff) | |
download | pyload-7c1309ea483b21cb2f97a509b61cb3363de8edb8.tar.xz |
client side settings save, working dl button on dashboard
Diffstat (limited to 'module/api')
-rw-r--r-- | module/api/ConfigApi.py | 2 | ||||
-rw-r--r-- | module/api/FileApi.py | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/module/api/ConfigApi.py b/module/api/ConfigApi.py index 4fba0c34e..309400808 100644 --- a/module/api/ConfigApi.py +++ b/module/api/ConfigApi.py @@ -106,7 +106,7 @@ class ConfigApi(ApiComponent): :param config: :class:`ConfigHolder` """ - pass + #TODO @RequirePerm(Permission.Plugins) def deleteConfig(self, plugin): diff --git a/module/api/FileApi.py b/module/api/FileApi.py index a5d5a8535..8a55d9dfd 100644 --- a/module/api/FileApi.py +++ b/module/api/FileApi.py @@ -74,6 +74,14 @@ class FileApi(ApiComponent): raise FileDoesNotExists(fid) return info + @RequirePerm(Permission.Download) + def getFilePath(self, fid): + """ Internal method to get the filepath""" + info = self.getFileInfo(fid) + pack = self.core.files.getPackage(info.package) + return pack.getPath(), info.name + + @RequirePerm(Permission.All) def findFiles(self, pattern): return self.core.files.getTree(-1, True, DownloadState.All, pattern) |