Added option to presrve archive files following extraction.

This commit is contained in:
Brian 2015-10-11 15:52:43 -04:00
commit b2ac5bbaf8
3 changed files with 16 additions and 4 deletions

View file

@ -84,6 +84,11 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
except:
Torrent_NoLink = 0
try:
keep_archive = int(section[usercat]["keep_archive"])
except:
keep_archive = 0
try:
extract = int(section[usercat]['extract'])
except:
@ -173,7 +178,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
if extract == 1:
logger.debug('Checking for archives to extract in directory: %s' % (outputDestination))
core.extractFiles(outputDestination)
core.extractFiles(inputDirectory, outputDestination, keep_archive)
if not inputCategory in core.NOFLATTEN: #don't flatten hp in case multi cd albums, and we need to copy this back later.
core.flatten(outputDestination)