mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 05:01:10 -07:00
added check for single file Torrent. Fixes #924
This commit is contained in:
parent
23fa424238
commit
b5ee0c241c
1 changed files with 5 additions and 1 deletions
|
@ -142,7 +142,11 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
|||
inputFiles = core.listMediaFiles(inputDirectory, archives=False, other=True, otherext=extensions)
|
||||
else:
|
||||
inputFiles = core.listMediaFiles(inputDirectory, other=True, otherext=extensions)
|
||||
logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory))
|
||||
if len(inputFiles) == 0 and os.path.isfile(inputDirectory):
|
||||
inputFiles = [inputDirectory]
|
||||
logger.debug("Found 1 file to process: {0}".format(inputDirectory))
|
||||
else:
|
||||
logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory))
|
||||
for inputFile in inputFiles:
|
||||
filePath = os.path.dirname(inputFile)
|
||||
fileName, fileExt = os.path.splitext(os.path.basename(inputFile))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue