added back force_clean. Fixes #490

This commit is contained in:
clinton-hall 2014-07-15 07:50:11 +09:30
commit ab8248977f
2 changed files with 5 additions and 2 deletions

View file

@ -273,7 +273,7 @@ def initialize(section=None):
GIT_PATH = CFG['General']['git_path']
GIT_USER = CFG['General']['git_user'] or 'clinton-hall'
GIT_BRANCH = CFG['General']['git_branch'] or 'master'
FORCE_CLEAN = CFG["General"]["force_clean"]
FORCE_CLEAN = int(CFG["General"]["force_clean"])
FFMPEG_PATH = CFG["General"]["ffmpeg_path"]
CHECK_MEDIA = int(CFG["General"]["check_media"])
SAFE_MODE = int(CFG["General"]["safe_mode"])

View file

@ -578,7 +578,10 @@ def cleanDir(path, section, subsection):
if not os.path.exists(path):
logger.info('Directory %s has been processed and removed ...' % (path), 'CLEANDIR')
return
if nzbtomedia.FORCE_CLEAN:
logger.info('Doing Forceful Clean of %s' % (path), 'CLEANDIR')
rmDir(path)
return
try:
minSize = int(nzbtomedia.CFG[section][subsection]['minSize'])
except:minSize = 0