summaryrefslogtreecommitdiffstats
path: root/module/Api.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-19 19:37:09 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-07-19 19:37:09 +0200
commit7c00440dfb7fd9772a5674f8e04f66aea2e73a10 (patch)
treee1dbb1eb2ad2d453f8b1ce1932ced58e1e8183fc /module/Api.py
parentcleanup (diff)
downloadpyload-7c00440dfb7fd9772a5674f8e04f66aea2e73a10.tar.xz
fix in unrar plugin
Diffstat (limited to 'module/Api.py')
-rw-r--r--module/Api.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/module/Api.py b/module/Api.py
index be72ee359..221809dc2 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -240,7 +240,7 @@ class Api(Iface):
return data
- def addPackage(self, name, links, dest):
+ def addPackage(self, name, links, dest=Destination.Queue):
"""Adds a package, with links to desired destination.
:param name: name of the new package
@@ -343,6 +343,19 @@ class Api(Iface):
return [self.addPackage(name, urls, dest) for name, urls
in self.generatePackages(links).iteritems()]
+ def checkAndAddPackages(self, links, dest=Destination.Queue):
+ """Checks online status, retrieves names, and will add packages.\
+ Because of this packages are not added immediatly, only for internal use.
+
+ :param links: list of urls
+ :param dest: `Destination`
+ :return: None
+ """
+ data = self.core.pluginManager.parseUrls(urls)
+ self.core.threadManager.createResultThread(data, True)
+
+
+
def getPackageData(self, pid):
"""Returns complete information about package, and included files.