fix import state before import started
This commit is contained in:
parent
26f2a40601
commit
ceffe456db
3 changed files with 16 additions and 11 deletions
|
|
@ -233,13 +233,14 @@ def run_import(options=None):
|
|||
remove_empty_folders(prefix, True)
|
||||
|
||||
def import_folder():
|
||||
import_path = settings.preferences['importPath']
|
||||
logger.debug('scan importPath %s', import_path)
|
||||
if os.path.exists(import_path):
|
||||
run_import({
|
||||
'path': import_path,
|
||||
'mode': 'move'
|
||||
})
|
||||
remove_empty_folders(import_path, True)
|
||||
if not (state.activity and state.activity.get('activity') == 'import'):
|
||||
import_path = settings.preferences['importPath']
|
||||
logger.debug('scan importPath %s', import_path)
|
||||
if os.path.exists(import_path):
|
||||
run_import({
|
||||
'path': import_path,
|
||||
'mode': 'move'
|
||||
})
|
||||
remove_empty_folders(import_path, True)
|
||||
if state.main:
|
||||
state.main.call_later(10*60, lambda: state.tasks.queue('scanimport'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue