diff options
| author | 2011-11-07 17:29:12 +0100 | |
|---|---|---|
| committer | 2011-11-07 17:29:12 +0100 | |
| commit | 9f792129ac074a8a6dbdbd2a04deae9cbe83c121 (patch) | |
| tree | 2c85f710c6766c1df803c242df062eafad290ed3 /module/plugins | |
| parent | closed #418 (diff) | |
| download | pyload-9f792129ac074a8a6dbdbd2a04deae9cbe83c121.tar.xz | |
closed #422
Diffstat (limited to 'module/plugins')
| -rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 3 | ||||
| -rw-r--r-- | module/plugins/internal/UnRar.py | 6 | 
2 files changed, 4 insertions, 5 deletions
| diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index 23ae6c543..74721d166 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -160,7 +160,8 @@ class ExtractArchive(Hook):              if self.getConfig("destination") and self.getConfig("destination").lower() != "none":                  if exists(self.getConfig("destination")): -                    out = save_join(self.getConfig("destination"), "") +                    out = save_join(dl, p.folder, self.getConfig("destination"), "") +                    #relative to package folder if destination is relative, otherwise absolute path overwrites them              files_ids = [(save_join(dl, p.folder, x["name"]), x["id"]) for x in p.getChildren().itervalues()] 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): | 
