diff options
| author | 2015-01-31 22:00:59 +0100 | |
|---|---|---|
| committer | 2015-01-31 22:00:59 +0100 | |
| commit | 79725268402043906f619f7c09e848e02ab8a17b (patch) | |
| tree | 5288f422b5f33005a19a0de2ddb53fecb99f3a21 /module/plugins/internal/UnRar.py | |
| parent | [JustPremium] Rewritten (diff) | |
| download | pyload-79725268402043906f619f7c09e848e02ab8a17b.tar.xz | |
Spare code cosmetics
Diffstat (limited to 'module/plugins/internal/UnRar.py')
| -rw-r--r-- | module/plugins/internal/UnRar.py | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/module/plugins/internal/UnRar.py b/module/plugins/internal/UnRar.py index 0738aa63b..f92a2ddd4 100644 --- a/module/plugins/internal/UnRar.py +++ b/module/plugins/internal/UnRar.py @@ -22,7 +22,7 @@ def renice(pid, value):  class UnRar(Extractor):      __name__    = "UnRar" -    __version__ = "1.05" +    __version__ = "1.06"      __description__ = """Rar extractor plugin"""      __license__     = "GPLv3" @@ -45,7 +45,7 @@ class UnRar(Extractor):      @classmethod -    def checkDeps(cls): +    def isUsable(cls):          if os.name == "nt":              cls.CMD = os.path.join(pypath, "UnRAR.exe")              p = Popen([cls.CMD], stdout=PIPE, stderr=PIPE) @@ -67,13 +67,13 @@ class UnRar(Extractor):      def getTargets(cls, files_ids):          targets = [] -        for filename, id in files_ids: -            if not cls.isArchive(filename): +        for fname, id in files_ids: +            if not cls.isArchive(fname):                  continue -            m = cls.re_rarpart1.match(filename) +            m = cls.re_rarpart1.match(fname)              if not m or int(m.group(1)) == 1:  #@NOTE: only add first part file -                targets.append((filename, id)) +                targets.append((fname, id))          return targets | 
