diff options
author | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-12-13 18:38:53 +0100 |
---|---|---|
committer | RaNaN <Mast3rRaNaN@hotmail.de> | 2013-12-13 18:38:53 +0100 |
commit | 3e84ea823766adef12946de90b33e62a84b52c46 (patch) | |
tree | c6b2345cc3c2f9c4f67a6985bd3c8282cdac9e59 /pyload/api | |
parent | plugin selection for linkgrabber, partial closes #182 (diff) | |
download | pyload-3e84ea823766adef12946de90b33e62a84b52c46.tar.xz |
added new file states
Diffstat (limited to 'pyload/api')
-rw-r--r-- | pyload/api/DownloadApi.py | 12 | ||||
-rw-r--r-- | pyload/api/FileApi.py | 15 |
2 files changed, 21 insertions, 6 deletions
diff --git a/pyload/api/DownloadApi.py b/pyload/api/DownloadApi.py index a0b7c9f96..38871cca7 100644 --- a/pyload/api/DownloadApi.py +++ b/pyload/api/DownloadApi.py @@ -98,24 +98,24 @@ class DownloadApi(ApiComponent): return self.addPackage(th.name, [th.name]) @RequirePerm(Permission.Delete) - def deleteFiles(self, fids): - """Deletes several file entries from pyload. + def removeFiles(self, fids): + """Removes several file entries from pyload. :param fids: list of file ids """ for fid in fids: - self.core.files.deleteFile(fid) + self.core.files.removeFile(fid) self.core.files.save() @RequirePerm(Permission.Delete) - def deletePackages(self, pids): - """Deletes packages and containing links. + def removePackages(self, pids): + """Rempve packages and containing links. :param pids: list of package ids """ for pid in pids: - self.core.files.deletePackage(pid) + self.core.files.removePackage(pid) self.core.files.save() diff --git a/pyload/api/FileApi.py b/pyload/api/FileApi.py index 817bae348..449a520b6 100644 --- a/pyload/api/FileApi.py +++ b/pyload/api/FileApi.py @@ -152,6 +152,21 @@ class FileApi(ApiComponent): """ return self.core.files.moveFiles(fids, pid) + def deleteFiles(self, fids): + """ Deletes files from disk + :param fids: list of file ids + :return: False if any file can't be deleted currently + """ + # TODO + + + def deletePackages(self, pids): + """ Delete package and all content from disk recursively + :param pids: list of package ids + :return: False if any package can't be deleted currently + """ + # TODO + @RequirePerm(Permission.Modify) def orderPackage(self, pid, position): """Set new position for a package. |