summaryrefslogtreecommitdiffstats
path: root/module/plugins/Plugin.py
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-02 22:14:08 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2010-10-02 22:14:08 +0200
commit5a679eeada699b74e29bf8947d25ae3e83289180 (patch)
tree61ee647b97ecf14a7d3516f29962507e70b3a560 /module/plugins/Plugin.py
parenturlencode fix (diff)
downloadpyload-5a679eeada699b74e29bf8947d25ae3e83289180.tar.xz
improved accountmanager
Diffstat (limited to 'module/plugins/Plugin.py')
-rw-r--r--module/plugins/Plugin.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/module/plugins/Plugin.py b/module/plugins/Plugin.py
index 8009c8f01..af164c3a5 100644
--- a/module/plugins/Plugin.py
+++ b/module/plugins/Plugin.py
@@ -17,8 +17,6 @@
@author: RaNaN, spoob, mkaay
"""
-import logging
-
from time import time
from time import sleep
@@ -96,12 +94,13 @@ class Plugin(object):
self.account = pyfile.m.core.accountManager.getAccountPlugin(self.__name__) # account handler instance
if self.account and not self.account.canUse(): self.account = None
if self.account:
- self.req = self.account.getAccountRequest(self)
+ self.user, data = self.account.selectAccount()
+ self.req = self.account.getAccountRequest(self.user)
#self.req.canContinue = True
else:
self.req = pyfile.m.core.requestFactory.getRequest(self.__name__)
- self.log = logging.getLogger("log")
+ self.log = pyfile.m.core.log
self.pyfile = pyfile
self.thread = None # holds thread in future
@@ -328,10 +327,11 @@ class Plugin(object):
if api_size and api_size <= size: return None
elif size > max_size: return None
-
+ self.log.debug("Download Check triggered")
f = open(self.lastDownload, "rb")
content = f.read()
f.close()
+ self.log.debug("Content: %s" % content)
for name, rule in rules.iteritems():
if type(rule) in (str, unicode):
if rule in content: