mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
added safeName for windows directory
This commit is contained in:
parent
628539da08
commit
7accf74fb9
1 changed files with 3 additions and 3 deletions
|
@ -32,7 +32,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash):
|
||||||
|
|
||||||
for category in categories:
|
for category in categories:
|
||||||
if category == inputCategory:
|
if category == inputCategory:
|
||||||
outputDestination = os.path.normpath(os.path.join(outputDirectory, category, inputName))
|
outputDestination = os.path.normpath(os.path.join(outputDirectory, category, safeName(inputName)))
|
||||||
Logger.info("MAIN: Output directory set to: %s", outputDestination)
|
Logger.info("MAIN: Output directory set to: %s", outputDestination)
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
|
@ -50,7 +50,7 @@ def main(inputDirectory, inputName, inputCategory, inputHash):
|
||||||
|
|
||||||
if root == 1:
|
if root == 1:
|
||||||
Logger.debug("MAIN: Looking for %s in filename", inputName)
|
Logger.debug("MAIN: Looking for %s in filename", inputName)
|
||||||
if (inputName in file) or (os.path.splitext(file)[0] in inputName):
|
if (safeName(inputName) in safeName(file)) or (safeName(os.path.splitext(file)[0]) in safeName(inputName)):
|
||||||
pass # This file does match the Torrent name
|
pass # This file does match the Torrent name
|
||||||
Logger.debug("Found file %s that matches Torrent Name %s", file, inputName)
|
Logger.debug("Found file %s that matches Torrent Name %s", file, inputName)
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue