summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-05 19:31:35 +0100
committerGravatar Sahil Shekhawat <sahilshekhawat01@gmail.com> 2015-01-05 19:31:35 +0100
commit7b8593899e3d37846fb3ed94d47d9daba13a02d7 (patch)
tree5427650c3dd14b0c2878a1081be3709458bf48db /module/plugins/internal
parentCreated plugin for Nitroflare.com (diff)
parentSpare code improvements (diff)
downloadpyload-7b8593899e3d37846fb3ed94d47d9daba13a02d7.tar.xz
Merge branch 'stable' of https://github.com/pyload/pyload into stable
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/MultiHook.py8
-rw-r--r--module/plugins/internal/SimpleHoster.py5
2 files changed, 11 insertions, 2 deletions
diff --git a/module/plugins/internal/MultiHook.py b/module/plugins/internal/MultiHook.py
index b5ac132b7..ea9f32673 100644
--- a/module/plugins/internal/MultiHook.py
+++ b/module/plugins/internal/MultiHook.py
@@ -9,7 +9,7 @@ from module.utils import remove_chars
class MultiHook(Hook):
__name__ = "MultiHook"
__type__ = "hook"
- __version__ = "0.28"
+ __version__ = "0.29"
__config__ = [("mode" , "all;listed;unlisted", "Use for plugins (if supported)" , "all"),
("pluginlist" , "str" , "Plugin list (comma separated)" , "" ),
@@ -43,6 +43,7 @@ class MultiHook(Hook):
def setup(self):
+ self.account = None
self.type = self.core.pluginManager.findPlugin(self.__name__)[1] or "hoster"
self.plugins = []
self.supported = []
@@ -51,7 +52,12 @@ class MultiHook(Hook):
def coreReady(self):
self.account = self.core.accountManager.getAccountPlugin(self.__name__)
+
+ if self.account and not self.account.canUse():
+ self.account = None
+
if not self.account:
+ self.logWarning("MultiHook will be deactivated due missing account reference")
self.setConfig('activated', False)
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index 4e2b4803b..c87a6160f 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -182,7 +182,7 @@ def secondsToMidnight(gmt=0):
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "0.89"
+ __version__ = "0.90"
__pattern__ = r'^unmatchable$'
@@ -593,6 +593,9 @@ class SimpleHoster(Hoster):
def checkTrafficLeft(self):
+ if not self.account:
+ return True
+
traffic = self.account.getAccountInfo(self.user, True)['trafficleft']
if traffic is None: