summaryrefslogtreecommitdiffstats
path: root/module/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins')
-rw-r--r--module/plugins/hooks/FreeWayMeHook.py9
-rw-r--r--module/plugins/hooks/PremiumToHook.py7
-rw-r--r--module/plugins/hooks/RPNetBizHook.py8
-rw-r--r--module/plugins/hoster/CzshareCom.py6
-rw-r--r--module/plugins/hoster/FastshareCz.py6
-rw-r--r--module/plugins/hoster/FileserveCom.py4
-rw-r--r--module/plugins/internal/Account.py15
-rw-r--r--module/plugins/internal/MultiHoster.py4
-rw-r--r--module/plugins/internal/SimpleCrypter.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py6
10 files changed, 33 insertions, 34 deletions
diff --git a/module/plugins/hooks/FreeWayMeHook.py b/module/plugins/hooks/FreeWayMeHook.py
index 5f30d70fc..1380433bf 100644
--- a/module/plugins/hooks/FreeWayMeHook.py
+++ b/module/plugins/hooks/FreeWayMeHook.py
@@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook
class FreeWayMeHook(MultiHook):
__name__ = "FreeWayMeHook"
__type__ = "hook"
- __version__ = "0.17"
+ __version__ = "0.18"
__status__ = "testing"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
@@ -20,6 +20,9 @@ class FreeWayMeHook(MultiHook):
def get_hosters(self):
- user, data = self.account.select()
- hostis = self.load("http://www.free-way.bz/ajax/jd.php", get={'id': 3, 'user': user, 'pass': data['password']}).replace("\"", "") #@TODO: Revert to `https` in 0.4.10
+ user, info = self.account.select()
+ hostis = self.load("http://www.free-way.bz/ajax/jd.php",
+ get={'id' : 3,
+ 'user': user,
+ 'pass': info['login']['password']}).replace("\"", "") #@TODO: Revert to `https` in 0.4.10
return [x.strip() for x in hostis.split(",") if x.strip()]
diff --git a/module/plugins/hooks/PremiumToHook.py b/module/plugins/hooks/PremiumToHook.py
index 062113e96..bcd7a7aab 100644
--- a/module/plugins/hooks/PremiumToHook.py
+++ b/module/plugins/hooks/PremiumToHook.py
@@ -6,7 +6,7 @@ from module.plugins.internal.MultiHook import MultiHook
class PremiumToHook(MultiHook):
__name__ = "PremiumToHook"
__type__ = "hook"
- __version__ = "0.10"
+ __version__ = "0.11"
__status__ = "testing"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
@@ -22,7 +22,8 @@ class PremiumToHook(MultiHook):
def get_hosters(self):
- user, data = self.account.select()
+ user, info = self.account.select()
html = self.load("http://premium.to/api/hosters.php",
- get={'username': user, 'password': data['password']})
+ get={'username': user,
+ 'password': info['login']['password']})
return [x.strip() for x in html.replace("\"", "").split(";")]
diff --git a/module/plugins/hooks/RPNetBizHook.py b/module/plugins/hooks/RPNetBizHook.py
index 5e7174de6..5d26b7f09 100644
--- a/module/plugins/hooks/RPNetBizHook.py
+++ b/module/plugins/hooks/RPNetBizHook.py
@@ -7,7 +7,7 @@ from module.plugins.internal.MultiHook import MultiHook
class RPNetBizHook(MultiHook):
__name__ = "RPNetBizHook"
__type__ = "hook"
- __version__ = "0.15"
+ __version__ = "0.16"
__status__ = "testing"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
@@ -22,10 +22,12 @@ class RPNetBizHook(MultiHook):
def get_hosters(self):
#: Get account data
- user, data = self.account.select()
+ user, info = self.account.select()
res = self.load("https://premium.rpnet.biz/client_api.php",
- get={'username': user, 'password': data['password'], 'action': "showHosterList"})
+ get={'username': user,
+ 'password': info['login']['password'],
+ 'action' : "showHosterList"})
hoster_list = json_loads(res)
#: If account is not valid thera are no hosters available
diff --git a/module/plugins/hoster/CzshareCom.py b/module/plugins/hoster/CzshareCom.py
index 9432dcb3b..3d2de5f7f 100644
--- a/module/plugins/hoster/CzshareCom.py
+++ b/module/plugins/hoster/CzshareCom.py
@@ -12,7 +12,7 @@ from module.utils import parseFileSize as parse_size
class CzshareCom(SimpleHoster):
__name__ = "CzshareCom"
__type__ = "hoster"
- __version__ = "1.01"
+ __version__ = "1.02"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?(czshare|sdilej)\.(com|cz)/(\d+/|download\.php\?).+'
@@ -72,7 +72,7 @@ class CzshareCom(SimpleHoster):
inputs = dict(re.findall(self.FORM_INPUT_PATTERN, form))
except Exception, e:
self.log_error(e)
- self.restart(reset=True)
+ self.restart(nopremium=True)
#: Download the file, destination is determined by pyLoad
self.download("http://sdilej.cz/profi_down.php", post=inputs, disposition=True)
@@ -148,7 +148,7 @@ class CzshareCom(SimpleHoster):
self.fail(_("File not available - try later"))
elif check == "credit":
- self.restart(reset=True)
+ self.restart(nopremium=True)
elif check == "multi-dl":
self.wait(5 * 60, 12, _("Download limit reached"))
diff --git a/module/plugins/hoster/FastshareCz.py b/module/plugins/hoster/FastshareCz.py
index 472f7c906..485d69d15 100644
--- a/module/plugins/hoster/FastshareCz.py
+++ b/module/plugins/hoster/FastshareCz.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class FastshareCz(SimpleHoster):
__name__ = "FastshareCz"
__type__ = "hoster"
- __version__ = "0.31"
+ __version__ = "0.32"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fastshare\.cz/\d+/.+'
@@ -42,7 +42,7 @@ class FastshareCz(SimpleHoster):
if self.CREDIT_ERROR in self.html:
errmsg = self.info['error'] = _("Not enough traffic left")
self.log_warning(errmsg)
- self.restart(reset=True)
+ self.restart(nopremium=True)
self.info.pop('error', None)
@@ -73,7 +73,7 @@ class FastshareCz(SimpleHoster):
self.retry(max_tries=5, reason=_("Wrong captcha"))
elif check == "credit":
- self.restart(reset=True)
+ self.restart(nopremium=True)
return super(FastshareCz, self).check_file()
diff --git a/module/plugins/hoster/FileserveCom.py b/module/plugins/hoster/FileserveCom.py
index 21b5897ab..a74589cff 100644
--- a/module/plugins/hoster/FileserveCom.py
+++ b/module/plugins/hoster/FileserveCom.py
@@ -33,7 +33,7 @@ def check_file(plugin, urls):
class FileserveCom(Hoster):
__name__ = "FileserveCom"
__type__ = "hoster"
- __version__ = "0.57"
+ __version__ = "0.58"
__status__ = "testing"
__pattern__ = r'http://(?:www\.)?fileserve\.com/file/(?P<ID>[^/]+)'
@@ -196,7 +196,7 @@ class FileserveCom(Hoster):
elif res['error_code'] in ["305", "500"]:
self.temp_offline()
elif res['error_code'] in ["403", "605"]:
- self.restart(reset=True)
+ self.restart(nopremium=True)
elif res['error_code'] in ["606", "607", "608"]:
self.offline()
else:
diff --git a/module/plugins/internal/Account.py b/module/plugins/internal/Account.py
index a402c4ad7..021dedf60 100644
--- a/module/plugins/internal/Account.py
+++ b/module/plugins/internal/Account.py
@@ -13,7 +13,7 @@ from module.utils import compare_time, lock, parseFileSize as parse_size
class Account(Plugin):
__name__ = "Account"
__type__ = "account"
- __version__ = "0.12"
+ __version__ = "0.13"
__status__ = "testing"
__description__ = """Base account plugin"""
@@ -73,7 +73,7 @@ class Account(Plugin):
self.accounts[user]['valid'] = True #@TODO: Remove in 0.4.10
finally:
- self.del_request()
+ self.clean()
return res
@@ -84,7 +84,7 @@ class Account(Plugin):
req = self.get_request(user)
if req:
req.clearCookies()
- self.del_request()
+ self.clean()
if user in self.info:
self.info[user]['login'].clear()
@@ -254,7 +254,7 @@ class Account(Plugin):
traceback.print_exc()
finally:
- self.del_request()
+ self.clean()
self.info[user].update(info)
return info
@@ -288,13 +288,6 @@ class Account(Plugin):
return self.pyload.requestFactory.getRequest(self.__name__, user)
- def del_request(self):
- try:
- self.req.close()
- finally:
- self.req = None
-
-
def get_cookies(self, user=None):
if not user:
user, info = self.select()
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index cdb668b82..a0ef3ff40 100644
--- a/module/plugins/internal/MultiHoster.py
+++ b/module/plugins/internal/MultiHoster.py
@@ -9,7 +9,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, r
class MultiHoster(SimpleHoster):
__name__ = "MultiHoster"
__type__ = "hoster"
- __version__ = "0.49"
+ __version__ = "0.50"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -100,7 +100,7 @@ class MultiHoster(SimpleHoster):
except Fail, e: #@TODO: Move to PluginThread in 0.4.10
if self.premium:
self.log_warning(_("Premium download failed"))
- self.restart(reset=True)
+ self.restart(nopremium=True)
elif self.get_config("revertfailed", True) \
and "new_module" in self.pyload.pluginManager.hosterPlugins[self.__name__]:
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index 084bc133c..f044fbb50 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -68,7 +68,7 @@ class SimpleCrypter(Crypter, SimpleHoster):
if self.account:
if not self.user:
- self.user, data = self.account.select()
+ self.user = self.account.select()[0]
if not self.user or not self.account.is_logged(self.user, relogin=True):
self.account = False
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index a03e301b3..8588fc5c5 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -23,7 +23,7 @@ statusMap = dict((v, k) for k, v in _statusMap.items())
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.76"
+ __version__ = "1.77"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -210,7 +210,7 @@ class SimpleHoster(Hoster):
self.leech_dl = False
if not self.get_config('use_premium', True):
- self.restart(reset=True)
+ self.restart(nopremium=True)
if self.LOGIN_PREMIUM and not self.premium:
self.fail(_("Required premium account not found"))
@@ -300,7 +300,7 @@ class SimpleHoster(Hoster):
except Fail, e: #@TODO: Move to PluginThread in 0.4.10
if self.get_config('fallback', True) and self.premium:
self.log_warning(_("Premium download failed"), e)
- self.restart(reset=True)
+ self.restart(nopremium=True)
else:
raise Fail(encode(e)) #@TODO: Remove `encode` in 0.4.10