mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-08-21 05:43:16 -07:00
added back force_clean. Fixes #490
This commit is contained in:
parent
ddd947aeb0
commit
ab8248977f
2 changed files with 5 additions and 2 deletions
|
@ -273,7 +273,7 @@ def initialize(section=None):
|
||||||
GIT_PATH = CFG['General']['git_path']
|
GIT_PATH = CFG['General']['git_path']
|
||||||
GIT_USER = CFG['General']['git_user'] or 'clinton-hall'
|
GIT_USER = CFG['General']['git_user'] or 'clinton-hall'
|
||||||
GIT_BRANCH = CFG['General']['git_branch'] or 'master'
|
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"]
|
FFMPEG_PATH = CFG["General"]["ffmpeg_path"]
|
||||||
CHECK_MEDIA = int(CFG["General"]["check_media"])
|
CHECK_MEDIA = int(CFG["General"]["check_media"])
|
||||||
SAFE_MODE = int(CFG["General"]["safe_mode"])
|
SAFE_MODE = int(CFG["General"]["safe_mode"])
|
||||||
|
|
|
@ -578,7 +578,10 @@ def cleanDir(path, section, subsection):
|
||||||
if not os.path.exists(path):
|
if not os.path.exists(path):
|
||||||
logger.info('Directory %s has been processed and removed ...' % (path), 'CLEANDIR')
|
logger.info('Directory %s has been processed and removed ...' % (path), 'CLEANDIR')
|
||||||
return
|
return
|
||||||
|
if nzbtomedia.FORCE_CLEAN:
|
||||||
|
logger.info('Doing Forceful Clean of %s' % (path), 'CLEANDIR')
|
||||||
|
rmDir(path)
|
||||||
|
return
|
||||||
try:
|
try:
|
||||||
minSize = int(nzbtomedia.CFG[section][subsection]['minSize'])
|
minSize = int(nzbtomedia.CFG[section][subsection]['minSize'])
|
||||||
except:minSize = 0
|
except:minSize = 0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue