From 5b71ec94fabd87c267f1dea446c53ef786e1b8f7 Mon Sep 17 00:00:00 2001 From: AndroKev Date: Sun, 27 Oct 2013 17:42:19 +0100 Subject: ExtractArchives - add an option to excludefiles --- module/plugins/internal/UnRar.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'module/plugins/internal/UnRar.py') diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index da8e7cf3d..00f15791a 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -29,7 +29,7 @@ from module.plugins.internal.AbstractExtractor import AbtractExtractor, WrongPas class UnRar(AbtractExtractor): __name__ = "UnRar" - __version__ = "0.13" + __version__ = "0.14" # there are some more uncovered rar formats re_splitfile = re.compile(r"(.*)\.part(\d+)\.rar$", re.I) @@ -185,6 +185,11 @@ class UnRar(AbtractExtractor): args = [] #overwrite flag args.append("-o+") if self.overwrite else args.append("-o-") + + if self.excludefiles != "": + for word in self.excludefiles.split(';'): + args.append("-x*" + word) + # assume yes on all queries args.append("-y") @@ -195,7 +200,6 @@ class UnRar(AbtractExtractor): else: args.append("-p-") - #NOTE: return codes are not reliable, some kind of threading, cleanup whatever issue call = [self.CMD, command] + args + list(xargs) self.m.logDebug(" ".join(call)) -- cgit v1.2.3 From aa9c7048902bf0fc90153118cf36d47910c7699c Mon Sep 17 00:00:00 2001 From: AndroKev Date: Sat, 2 Nov 2013 16:57:07 +0100 Subject: Deleted default value and cleaned the code a little bit --- module/plugins/internal/UnRar.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'module/plugins/internal/UnRar.py') diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 00f15791a..8a97ac7b7 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -186,7 +186,7 @@ class UnRar(AbtractExtractor): #overwrite flag args.append("-o+") if self.overwrite else args.append("-o-") - if self.excludefiles != "": + if self.excludefiles: for word in self.excludefiles.split(';'): args.append("-x*" + word) -- cgit v1.2.3 From 1cc2e8415828c2e4d60a3c872ea6b6cfd5f284c5 Mon Sep 17 00:00:00 2001 From: AndroKev Date: Sat, 2 Nov 2013 18:34:05 +0100 Subject: Deleted the wildcard --- module/plugins/internal/UnRar.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'module/plugins/internal/UnRar.py') diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 8a97ac7b7..80ee39cdf 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -188,9 +188,8 @@ class UnRar(AbtractExtractor): if self.excludefiles: for word in self.excludefiles.split(';'): - args.append("-x*" + word) + args.append("-x%s" % word ) - # assume yes on all queries args.append("-y") -- cgit v1.2.3