summaryrefslogtreecommitdiffstats
path: root/pyload/api/__init__.py
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-16 00:17:49 +0100
committerGravatar Walter Purcaro <vuolter@gmail.com> 2014-11-16 00:17:49 +0100
commitf975a1b5dd34b3fd6420f68d6d26eedd4d4cf83b (patch)
tree766f1eecd1b9d86a7334039937d9ac54401a6889 /pyload/api/__init__.py
parentSpare code cosmetics (diff)
downloadpyload-f975a1b5dd34b3fd6420f68d6d26eedd4d4cf83b.tar.xz
[PluginManager] Improve getPlugin
Diffstat (limited to 'pyload/api/__init__.py')
-rw-r--r--pyload/api/__init__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/pyload/api/__init__.py b/pyload/api/__init__.py
index 570dc5eac..017a9a939 100644
--- a/pyload/api/__init__.py
+++ b/pyload/api/__init__.py
@@ -27,7 +27,7 @@ from pyload.datatype.PyFile import PyFile
from pyload.utils.packagetools import parseNames
from network.RequestFactory import getURL
from remote import activated
-from utils import compare_time, freeSpace, html_unescape, save_path
+from utils import compare_time, freeSpace, html_unescape, save_filename
if activated:
try:
@@ -322,7 +322,7 @@ class Api(Iface):
else:
folder = ""
- folder = save_path(folder)
+ folder = save_filename(folder)
pid = self.core.files.addPackage(name, folder, dest)
@@ -364,11 +364,11 @@ class Api(Iface):
data = self.core.pluginManager.parseUrls(urls)
plugins = {}
- for url, plugin in data:
- if plugin in plugins:
- plugins[plugin].append(url)
- else:
- plugins[plugin] = [url]
+ for url, plugintype, pluginname in data:
+ try:
+ plugins[plugintype][pluginname].append(url)
+ except:
+ plugins[plugintype][pluginname] = [url]
return plugins
@@ -383,7 +383,7 @@ class Api(Iface):
rid = self.core.threadManager.createResultThread(data, False)
- tmp = [(url, (url, OnlineStatus(url, pluginname, "unknown", 3, 0))) for url, pluginname in data]
+ tmp = [(url, (url, OnlineStatus(url, (plugintype, pluginname), "unknown", 3, 0))) for url, plugintype, pluginname in data]
data = parseNames(tmp)
result = {}