mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-14 01:02:55 -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,6 +142,10 @@ def processTorrent(inputDirectory, inputName, inputCategory, inputHash, inputID,
|
||||||
inputFiles = core.listMediaFiles(inputDirectory, archives=False, other=True, otherext=extensions)
|
inputFiles = core.listMediaFiles(inputDirectory, archives=False, other=True, otherext=extensions)
|
||||||
else:
|
else:
|
||||||
inputFiles = core.listMediaFiles(inputDirectory, other=True, otherext=extensions)
|
inputFiles = core.listMediaFiles(inputDirectory, other=True, otherext=extensions)
|
||||||
|
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))
|
logger.debug("Found {0} files in {1}".format(len(inputFiles), inputDirectory))
|
||||||
for inputFile in inputFiles:
|
for inputFile in inputFiles:
|
||||||
filePath = os.path.dirname(inputFile)
|
filePath = os.path.dirname(inputFile)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue