summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--module/Api.py5
-rw-r--r--module/PyFile.py5
-rw-r--r--module/PyPackage.py2
-rw-r--r--module/interaction/EventManager.py3
-rw-r--r--module/plugins/Crypter.py7
5 files changed, 9 insertions, 13 deletions
diff --git a/module/Api.py b/module/Api.py
index 810613b66..e6bd10762 100644
--- a/module/Api.py
+++ b/module/Api.py
@@ -318,7 +318,8 @@ class Api(Iface):
"""
hoster, crypter = self.core.pluginManager.parseUrls(links)
- self.core.files.addLinks(hoster, pid)
+ if hoster:
+ self.core.files.addLinks(hoster, pid)
self.core.threadManager.createInfoThread(hoster, pid)
self.core.threadManager.createDecryptThread(crypter, pid)
@@ -998,4 +999,4 @@ class Api(Iface):
def setUserPermission(self, user, permission, role):
self.core.db.setPermission(user, permission)
- self.core.db.setRole(user, role) \ No newline at end of file
+ self.core.db.setRole(user, role)
diff --git a/module/PyFile.py b/module/PyFile.py
index dae61e361..b446fde65 100644
--- a/module/PyFile.py
+++ b/module/PyFile.py
@@ -17,13 +17,12 @@
@author: mkaay
"""
-from interaction.PullEvents import UpdateEvent
-from module.utils import formatSize, lock
from time import sleep, time
-
from threading import RLock
+from module.utils import formatSize, lock
+
statusMap = {
"finished": 0,
"offline": 1,
diff --git a/module/PyPackage.py b/module/PyPackage.py
index d4b468f9c..970982e68 100644
--- a/module/PyPackage.py
+++ b/module/PyPackage.py
@@ -17,8 +17,6 @@
@author: mkaay
"""
-from interaction.PullEvents import UpdateEvent
-
class PyPackage():
"""
Represents a package object at runtime
diff --git a/module/interaction/EventManager.py b/module/interaction/EventManager.py
index 0c4fc80c9..8a80553cf 100644
--- a/module/interaction/EventManager.py
+++ b/module/interaction/EventManager.py
@@ -1,7 +1,6 @@
# -*- coding: utf-8 -*-
from time import time
-from PullEvents import ReloadAllEvent
from module.utils import uniqify
class EventManager:
@@ -55,4 +54,4 @@ class Client:
return self.events.pop(0)
def addEvent(self, event):
- self.events.append(event) \ No newline at end of file
+ self.events.append(event)
diff --git a/module/plugins/Crypter.py b/module/plugins/Crypter.py
index 7c76afee7..c645f2a72 100644
--- a/module/plugins/Crypter.py
+++ b/module/plugins/Crypter.py
@@ -159,8 +159,8 @@ class Crypter(Base):
self.decrypt()
result = self.convertPackages()
else:
- if not has_method(cls, "decryptFile"):
- self.logDebug("No Decrypting method was overwritten in plugin %s" % self.__name__)
+ if not has_method(cls, "decryptFile") or urls:
+ self.logDebug("No suited decrypting method was overwritten in plugin")
result = []
if has_method(cls, "decryptFile"):
@@ -199,7 +199,7 @@ class Crypter(Base):
for url in urls:
path = None
if url.startswith("http"):
- path = None # skip directly
+ pass
elif exists(url):
path = url
elif exists(self.core.path(url)):
@@ -212,7 +212,6 @@ class Crypter(Base):
f.close()
except IOError, e:
self.logError("IOError", e)
- remote.append(url)
else:
remote.append(url)