mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 21:33:13 -07:00
Fixed issues in the nzbTo* scripts with manual runs not properly sending the categories to be processed.
Fixed issue in TorrentToMedia with noFlatten variable for HeadPhones. Changed name of function get_categories to get_sections in nzbToMediaUtil. Added code in get_dirnames to properly return back the directory could not find anything to process in.
This commit is contained in:
parent
2791139c6b
commit
c3410fba8f
10 changed files with 70 additions and 72 deletions
|
@ -451,13 +451,13 @@ def parse_args(clientAgent):
|
|||
|
||||
return clients[clientAgent](sys.argv)
|
||||
|
||||
def get_dirnames(section, category):
|
||||
def get_dirnames(section, inputCategory):
|
||||
try:
|
||||
watch_dir = config()[section][inputCategory]["watch_dir"]
|
||||
except:
|
||||
watch_dir = ""
|
||||
try:
|
||||
outputDirectory = os.path.join(config()["Torrent"]["outputDirectory"], category)
|
||||
outputDirectory = os.path.join(config()["Torrent"]["outputDirectory"], inputCategory)
|
||||
except:
|
||||
outputDirectory = ""
|
||||
|
||||
|
@ -467,13 +467,15 @@ def get_dirnames(section, category):
|
|||
if os.path.exists(watch_dir):
|
||||
dirNames.extend([os.path.join(watch_dir, o) for o in os.listdir(watch_dir) if
|
||||
os.path.isdir(os.path.join(watch_dir, o))])
|
||||
if not dirNames:
|
||||
Logger.warn("No Directories identified to Scan inside " + watch_dir)
|
||||
|
||||
if outputDirectory != "":
|
||||
if os.path.exists(outputDirectory):
|
||||
dirNames.extend([os.path.join(outputDirectory, o) for o in os.listdir(outputDirectory) if
|
||||
os.path.isdir(os.path.join(outputDirectory, o))])
|
||||
|
||||
if not dirNames:
|
||||
Logger.warn("No Directories identified to Scan.")
|
||||
if not dirNames:
|
||||
Logger.warn("No Directories identified to Scan inside " + outputDirectory)
|
||||
|
||||
return dirNames
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue