summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
authorGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-02 12:30:04 +0200
committerGravatar Walter Purcaro <vuolter@users.noreply.github.com> 2015-10-02 12:30:04 +0200
commit4afeed04d2913b7635c5cd3917c90b928d53b151 (patch)
tree0fa16b60f9f7c9c73581a7ee3ab963ed24b97255 /module/plugins/internal
parentMerge pull request #1933 from jansohn/stable (diff)
downloadpyload-4afeed04d2913b7635c5cd3917c90b928d53b151.tar.xz
Fix https://github.com/pyload/pyload/issues/1932
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/Hoster.py6
-rw-r--r--module/plugins/internal/MultiHoster.py6
-rw-r--r--module/plugins/internal/Plugin.py4
-rw-r--r--module/plugins/internal/SimpleCrypter.py2
-rw-r--r--module/plugins/internal/SimpleHoster.py12
5 files changed, 15 insertions, 15 deletions
diff --git a/module/plugins/internal/Hoster.py b/module/plugins/internal/Hoster.py
index 26da436a5..86b684414 100644
--- a/module/plugins/internal/Hoster.py
+++ b/module/plugins/internal/Hoster.py
@@ -13,7 +13,7 @@ from module.utils import fs_decode, fs_encode, save_join as fs_join, save_path a
class Hoster(Base):
__name__ = "Hoster"
__type__ = "hoster"
- __version__ = "0.34"
+ __version__ = "0.35"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -87,13 +87,13 @@ class Hoster(Base):
except Fail, e: #@TODO: Move to PluginThread in 0.4.10
if self.get_config('fallback_premium', True) and self.premium:
self.log_warning(_("Premium download failed"), e)
- self.restart()
+ self.restart(premium=False)
else:
raise Fail(e)
- def restart(self, msg="", premium=False):
+ def restart(self, msg="", premium=True):
if not msg:
msg = _("Simple restart") if premium else _("Fallback to free download")
diff --git a/module/plugins/internal/MultiHoster.py b/module/plugins/internal/MultiHoster.py
index d7d3c5ccd..f5c3d091d 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.52"
+ __version__ = "0.53"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -102,7 +102,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()
+ self.restart(premium=False)
elif self.get_config("revertfailed", True) \
and "new_module" in self.pyload.pluginManager.hosterPlugins[self.__name__]:
@@ -118,7 +118,7 @@ class MultiHoster(SimpleHoster):
hdict['new_module'] = tmp_module
hdict['new_name'] = tmp_name
- self.restart(_("Revert to original hoster plugin"), premium=True)
+ self.restart(_("Revert to original hoster plugin"))
else:
raise Fail(encode(e)) #@TODO: Remove `encode` in 0.4.10
diff --git a/module/plugins/internal/Plugin.py b/module/plugins/internal/Plugin.py
index 6d94ca1e4..3b1f3575f 100644
--- a/module/plugins/internal/Plugin.py
+++ b/module/plugins/internal/Plugin.py
@@ -61,7 +61,7 @@ def fixurl(url, unquote=None):
unquote = newurl == url
newurl = html_unescape(newurl.decode('unicode-escape'))
- newurl = re.sub(r'[^:]/{2,}', '/', newurl).strip().lstrip('.')
+ newurl = re.sub(r'(?<!:)/{2,}', '/', newurl).strip().lstrip('.')
if not unquote:
newurl = urllib.quote(newurl)
@@ -228,7 +228,7 @@ def chunks(iterable, size):
class Plugin(object):
__name__ = "Plugin"
__type__ = "plugin"
- __version__ = "0.44"
+ __version__ = "0.45"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
diff --git a/module/plugins/internal/SimpleCrypter.py b/module/plugins/internal/SimpleCrypter.py
index a6feb8fbe..30b8ebfb0 100644
--- a/module/plugins/internal/SimpleCrypter.py
+++ b/module/plugins/internal/SimpleCrypter.py
@@ -10,7 +10,7 @@ from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo
class SimpleCrypter(Crypter, SimpleHoster):
__name__ = "SimpleCrypter"
__type__ = "crypter"
- __version__ = "0.64"
+ __version__ = "0.65"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
diff --git a/module/plugins/internal/SimpleHoster.py b/module/plugins/internal/SimpleHoster.py
index e5526a7bd..fb621a278 100644
--- a/module/plugins/internal/SimpleHoster.py
+++ b/module/plugins/internal/SimpleHoster.py
@@ -16,7 +16,7 @@ from module.utils import fixup, fs_encode, parseFileSize as parse_size
class SimpleHoster(Hoster):
__name__ = "SimpleHoster"
__type__ = "hoster"
- __version__ = "1.93"
+ __version__ = "1.94"
__status__ = "testing"
__pattern__ = r'^unmatchable$'
@@ -315,7 +315,7 @@ class SimpleHoster(Hoster):
self.log_warning(_("Check result: ") + errmsg, _("Waiting 1 minute and retry"))
self.wait(60, reconnect=True)
- self.restart(errmsg, premium=True)
+ self.restart(errmsg)
else:
if self.CHECK_FILE:
self.log_debug("Using custom check rules...")
@@ -354,7 +354,7 @@ class SimpleHoster(Hoster):
wait_time = parse_time(errmsg)
self.wait(wait_time, reconnect=wait_time > 300)
- self.restart(_("Download limit exceeded"), premium=True)
+ self.restart(_("Download limit exceeded"))
if self.HAPPY_HOUR_PATTERN and re.search(self.HAPPY_HOUR_PATTERN, self.html):
self.multiDL = True
@@ -374,7 +374,7 @@ class SimpleHoster(Hoster):
if re.search('limit|wait|slot', errmsg, re.I):
wait_time = parse_time(errmsg)
self.wait(wait_time, reconnect=wait_time > 300)
- self.restart(_("Download limit exceeded"), premium=True)
+ self.restart(_("Download limit exceeded"))
elif re.search('country|ip|region|nation', errmsg, re.I):
self.fail(_("Connection from your current IP address is not allowed"))
@@ -402,7 +402,7 @@ class SimpleHoster(Hoster):
else:
self.wait(60, reconnect=True)
- self.restart(errmsg, premium=True)
+ self.restart(errmsg)
elif self.WAIT_PATTERN:
m = re.search(self.WAIT_PATTERN, self.html)
@@ -516,7 +516,7 @@ class SimpleHoster(Hoster):
def handle_premium(self, pyfile):
if not self.LINK_PREMIUM_PATTERN:
self.log_error(_("Premium download not implemented"))
- self.restart()
+ self.restart(premium=False)
m = re.search(self.LINK_PREMIUM_PATTERN, self.html)
if m is None: