diff options
author | Walter Purcaro <vuolter@gmail.com> | 2015-02-22 18:46:42 +0100 |
---|---|---|
committer | Walter Purcaro <vuolter@gmail.com> | 2015-02-22 18:46:42 +0100 |
commit | 3f730185250d7b88ce83aaa3550354138cf803bd (patch) | |
tree | ca28516f955715584686a59f5deb6ec7e0032e70 | |
parent | [HotFolder] Fixup (thx zapp-brannigan) (diff) | |
parent | [ExtractArchive] preventing duplicate files extraction (diff) | |
download | pyload-3f730185250d7b88ce83aaa3550354138cf803bd.tar.xz |
Merge pull request #1197 from immenz/dev_extract
[ExtractArchive] preventing duplicate files extraction
-rw-r--r-- | module/plugins/hooks/ExtractArchive.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/module/plugins/hooks/ExtractArchive.py b/module/plugins/hooks/ExtractArchive.py index a1e85ba57..8b84966fd 100644 --- a/module/plugins/hooks/ExtractArchive.py +++ b/module/plugins/hooks/ExtractArchive.py @@ -104,7 +104,7 @@ class ArchiveQueue(object): class ExtractArchive(Hook): __name__ = "ExtractArchive" __type__ = "hook" - __version__ = "1.30" + __version__ = "1.31" __config__ = [("activated" , "bool" , "Activated" , True ), ("fullpath" , "bool" , "Extract with full paths" , True ), @@ -269,7 +269,8 @@ class ExtractArchive(Hook): matched = False success = True - files_ids = [(save_join(dl, pypack.folder, pylink['name']), pylink['id'], out) for pylink in pypack.getChildren().itervalues()] + files_ids = dict((pylink['name'],((save_join(dl, pypack.folder, pylink['name'])), pylink['id'], out)) for pylink \ + in sorted(pypack.getChildren().itervalues(), key=lambda k: k['name'])).values() # remove duplicates # check as long there are unseen files while files_ids: |