mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-14 02:26:53 -07:00
Added option to presrve archive files following extraction.
This commit is contained in:
parent
1cd64053b0
commit
b2ac5bbaf8
3 changed files with 16 additions and 4 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue