scanner: Handle missing media_dir
This commit is contained in:
parent
69ddfe4eb0
commit
ba40c0032b
@ -35,8 +35,8 @@ from mopidy.utils import log, path, versioning
|
||||
def main():
|
||||
options = parse_options()
|
||||
# TODO: support config files and overrides (shared from main?)
|
||||
config_files = ['/etc/mopidy/mopidy.conf',
|
||||
'$XDG_CONFIG_DIR/mopidy/mopidy.conf']
|
||||
config_files = [b'/etc/mopidy/mopidy.conf',
|
||||
b'$XDG_CONFIG_DIR/mopidy/mopidy.conf']
|
||||
config_overrides = []
|
||||
|
||||
# TODO: decide if we want to avoid this boilerplate some how.
|
||||
@ -50,6 +50,10 @@ def main():
|
||||
config_files, extensions, config_overrides)
|
||||
log.setup_log_levels(config)
|
||||
|
||||
if not config['local']['media_dir']:
|
||||
logging.warning('local/media_dir is not set.')
|
||||
return
|
||||
|
||||
# TODO: missing error checking and other default setup code.
|
||||
|
||||
tracks = []
|
||||
|
||||
Loading…
Reference in New Issue
Block a user