summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-29 13:28:16 +0100
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-12-29 13:28:16 +0100
commit02a12fe304da59c6a68071af0c8587270870803d (patch)
treefc5f0c147772ab20ff114f305ce960772f8a163b /module/plugins
parentfixed accounts (diff)
downloadpyload-02a12fe304da59c6a68071af0c8587270870803d.tar.xz
better cleanup
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/Plugin.py14
-rw-r--r--module/plugins/hoster/MegauploadCom.py7
2 files changed, 12 insertions, 9 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index a7ee72fd2..8a26996d0 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -121,12 +121,6 @@ class Plugin(object):
def __call__(self):
return self.__name__
- def __del__(self):
- if hasattr(self, "pyfile"):
- del self.pyfile
- if hasattr(self, "req"):
- del self.req
-
def setup(self):
""" more init stuff if needed """
pass
@@ -387,3 +381,11 @@ class Plugin(object):
remove(self.lastDownload)
self.lastCheck = m
return name
+
+ def clean(self):
+ """ clean everything and remove references """
+ if hasattr(self, "pyfile"):
+ del self.pyfile
+ if hasattr(self, "req"):
+ self.req.close()
+ del self.req \ No newline at end of file
diff --git a/module/plugins/hoster/MegauploadCom.py b/module/plugins/hoster/MegauploadCom.py
index 23ddbadb0..e67237af2 100644
--- a/module/plugins/hoster/MegauploadCom.py
+++ b/module/plugins/hoster/MegauploadCom.py
@@ -59,9 +59,10 @@ class MegauploadCom(Hoster):
if self.account:
self.premium = self.account.getAccountInfo(self.user)["premium"]
- if self.premium:
- self.multiDL = True
- self.req.canContinue = True
+ if not self.premium:
+ self.multiDL = False
+ self.resumeDownload = False
+ self.chunkLimit = 1
else:
self.multiDL = False
self.api = {}