mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Extraction now takes place after linking is done in destination folder.
This commit is contained in:
parent
a183295657
commit
a7d367c93b
1 changed files with 5 additions and 5 deletions
|
@ -32,11 +32,7 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
||||||
logger.debug("Determined Directory: %s | Name: %s | Category: %s" % (inputDirectory, inputName, inputCategory))
|
logger.debug("Determined Directory: %s | Name: %s | Category: %s" % (inputDirectory, inputName, inputCategory))
|
||||||
|
|
||||||
section = nzbtomedia.CFG.findsection(inputCategory)
|
section = nzbtomedia.CFG.findsection(inputCategory)
|
||||||
if section:
|
if not section:
|
||||||
if nzbtomedia.CFG[section][inputCategory]['extract']:
|
|
||||||
logger.debug('Checking for archives to extract in directory: %s' % (inputDirectory))
|
|
||||||
extractFiles(inputDirectory)
|
|
||||||
else:
|
|
||||||
logger.error(
|
logger.error(
|
||||||
"We could not find a section with containing a download category labeled %s in your autoProcessMedia.cfg, Exiting!" % inputCategory)
|
"We could not find a section with containing a download category labeled %s in your autoProcessMedia.cfg, Exiting!" % inputCategory)
|
||||||
return -1
|
return -1
|
||||||
|
@ -122,6 +118,10 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
||||||
if platform.system() == 'Windows': # remove Read Only flag from files in Windows.
|
if platform.system() == 'Windows': # remove Read Only flag from files in Windows.
|
||||||
remove_read_only(outputDestination)
|
remove_read_only(outputDestination)
|
||||||
|
|
||||||
|
if nzbtomedia.CFG[section][inputCategory]['extract']:
|
||||||
|
logger.debug('Checking for archives to extract in directory: %s' % (outputDestination))
|
||||||
|
extractFiles(outputDestination)
|
||||||
|
|
||||||
# Now check if video files exist in destination:
|
# Now check if video files exist in destination:
|
||||||
if nzbtomedia.CFG["SickBeard","NzbDrone", "CouchPotato"][inputCategory]:
|
if nzbtomedia.CFG["SickBeard","NzbDrone", "CouchPotato"][inputCategory]:
|
||||||
for outputFile in listMediaFiles(outputDestination):
|
for outputFile in listMediaFiles(outputDestination):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue