summaryrefslogtreecommitdiffstats
path: root/pyload/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'pyload/plugins')
-rw-r--r--pyload/plugins/internal/UnRar.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/pyload/plugins/internal/UnRar.py b/pyload/plugins/internal/UnRar.py
index 8635483e6..c088c147d 100644
--- a/pyload/plugins/internal/UnRar.py
+++ b/pyload/plugins/internal/UnRar.py
@@ -29,12 +29,14 @@ from module.plugins.internal.AbstractExtractor import AbtractExtractor, WrongPas
class UnRar(AbtractExtractor):
__name__ = "UnRar"
- __version__ = "0.14"
+ __version__ = "0.15"
# there are some more uncovered rar formats
+ re_version = re.compile(r"(UNRAR 5[\.\d]+ freeware)")
re_splitfile = re.compile(r"(.*)\.part(\d+)\.rar$", re.I)
re_partfiles = re.compile(r".*\.(rar|r[0-9]+)", re.I)
re_filelist = re.compile(r"(.+)\s+(\d+)\s+(\d+)\s+")
+ re_filelist5 = re.compile(r"(.+)\s+(\d+)\s+\d\d-\d\d-\d\d\s+\d\d:\d\d\s+(.+)")
re_wrongpwd = re.compile("(Corrupt file or wrong password|password incorrect)", re.I)
CMD = "unrar"
@@ -90,10 +92,16 @@ class UnRar(AbtractExtractor):
return True
# output only used to check if passworded files are present
- for name, size, packed in self.re_filelist.findall(out):
- if name.startswith("*"):
- self.passwordProtected = True
- return True
+ if self.re_version.search(out):
+ for attr, size, name in self.re_filelist5.findall(out):
+ if attr.startswith("*"):
+ self.passwordProtected = True
+ return True
+ else:
+ for name, size, packed in self.re_filelist.findall(out):
+ if name.startswith("*"):
+ self.passwordProtected = True
+ return True
self.listContent()
if not self.files: