mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
Switched our config class to configObj.
nzbToMedia now fully performs manual runs for all autoProcessing scripts. autoProcessing categories are now sub-sections in the autoProcessingMedia.cfg file which allows you to have a unlimited amount of categories for your liking. nzbToMedia supports categories for all autoProcessing scripts now. Minor bug fixes and code cleanup performed during the re-code. Auto-migration code will convert old-style cfg files to new-style cfg format.
This commit is contained in:
parent
027c3e5a43
commit
b7fc74b3fd
22 changed files with 4473 additions and 572 deletions
|
@ -148,8 +148,8 @@ if migratecfg().migrate():
|
|||
else:
|
||||
sys.exit(-1)
|
||||
|
||||
# couchpotato category
|
||||
cpsCategory = (config().get("CouchPotato", "cpsCategory")).split(',') # movie
|
||||
# setup sections and categories
|
||||
categories = config.get_categories(["CouchPotato"])
|
||||
|
||||
WakeUp()
|
||||
|
||||
|
@ -239,10 +239,13 @@ else:
|
|||
Logger.warn("MAIN: Invalid number of arguments received from client.")
|
||||
Logger.info("MAIN: Running autoProcessMovie as a manual run...")
|
||||
|
||||
for dirName in get_dirnames("CouchPotato", cpsCategory[0]):
|
||||
Logger.info("MAIN: Calling CouchPotato to post-process: %s", dirName)
|
||||
result = autoProcessMovie().process(dirName, dirName, 0)
|
||||
if result != 0: break
|
||||
for section, category in categories.items():
|
||||
for dirName in get_dirnames(section, category):
|
||||
Logger.info("MAIN: Calling " + section + ":" + category + " to post-process: %s", dirName)
|
||||
results = autoProcessMovie().process(dirName, dirName, 0)
|
||||
if results != 0:
|
||||
result = 1
|
||||
Logger.info("MAIN: A problem was reported in the autoProcessMovie script.")
|
||||
|
||||
if result == 0:
|
||||
Logger.info("MAIN: The autoProcessMovie script completed successfully.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue