mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-20 13:23:18 -07:00
All processing sections now can enable/disable linking for torrents via TorrentNoLink option in autoProcessMedia.cfg
Cleanup/removal of processed files on start and finish of our nzbToMedia and TorrentToMedia scripts to insure things stay nice and polished :) Code tweaked and cleaned and fed a energy drink so stay on the look out this things alive ! lol
This commit is contained in:
parent
0053fdcf3e
commit
27d722e8b1
5 changed files with 69 additions and 64 deletions
|
@ -311,6 +311,10 @@ def process(nzbDir, inputName=None, status=0, clientAgent='manual', download_id=
|
|||
logger.error("We could not find a section with containing a download category labeled %s in your autoProcessMedia.cfg, Exiting!" % inputCategory)
|
||||
result = -1
|
||||
|
||||
if result == 0:
|
||||
# cleanup our processing folders of any misc unwanted files and empty directories
|
||||
cleanProcDirs()
|
||||
|
||||
return result
|
||||
|
||||
def main(args, section=None):
|
||||
|
@ -423,13 +427,13 @@ def main(args, section=None):
|
|||
if results != 0:
|
||||
logger.error("A problem was reported when trying to perform a manual run for %s:%s." % (section, category))
|
||||
result = results
|
||||
|
||||
if len(dirNames) == 0:
|
||||
logger.info('[%s] - No directories found to post-process ...' % (str(category).upper()), section)
|
||||
else:
|
||||
logger.debug("nzbToMedia %s:%s is DISABLED" % (section, category))
|
||||
|
||||
if result == 0:
|
||||
# cleanup our processing folders of any misc unwanted files and empty directories
|
||||
cleanProcDirs()
|
||||
|
||||
logger.info("The %s script completed successfully." % args[0])
|
||||
if os.environ.has_key('NZBOP_SCRIPTDIR'): # return code for nzbget v11
|
||||
sys.exit(nzbtomedia.NZBGET_POSTPROCESS_SUCCESS)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue