summaryrefslogtreecommitdiffstats
path: root/module/plugins/internal
diff options
context:
space:
mode:
Diffstat (limited to 'module/plugins/internal')
-rw-r--r--module/plugins/internal/UnRar.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py
index 7ba1d01ba..1943f69e0 100644
--- a/module/plugins/internal/UnRar.py
+++ b/module/plugins/internal/UnRar.py
@@ -18,16 +18,14 @@
"""
import os
+import re
from os.path import join
from glob import glob
from subprocess import Popen, PIPE
-
from module.plugins.hooks.ExtractArchive import AbtractExtractor
from module.utils import save_join, decode
-import re
-
class UnRar(AbtractExtractor):
__name__ = "UnRar"
__version__ = "0.1"
@@ -138,7 +136,7 @@ class UnRar(AbtractExtractor):
def getDeleteFiles(self):
if ".part" in self.file:
- return glob(self.file.replace("0", "*").replace("1", "*"))
+ return glob(re.sub("(?<=\.part)([01]+)", "*", self.file, re.IGNORECASE))
return [self.file]
def listContent(self):