local: Add follow symlinks setting
This commit is contained in:
parent
369edab76d
commit
b9a7a9d2b6
@ -86,6 +86,10 @@ See :ref:`config` for general help on configuring Mopidy.
|
||||
Number of milliseconds before giving up scanning a file and moving on to
|
||||
the next file.
|
||||
|
||||
.. confval:: local/scan_follow_symlinks
|
||||
|
||||
If we should follow symlinks found in :confval:`local/media_dir`
|
||||
|
||||
.. confval:: local/scan_flush_threshold
|
||||
|
||||
Number of tracks to wait before telling library it should try and store
|
||||
|
||||
@ -29,6 +29,7 @@ class Extension(ext.Extension):
|
||||
schema['scan_timeout'] = config.Integer(
|
||||
minimum=1000, maximum=1000*60*60)
|
||||
schema['scan_flush_threshold'] = config.Integer(minimum=0)
|
||||
schema['scan_follow_symlinks'] = config.Boolean()
|
||||
schema['excluded_file_extensions'] = config.List(optional=True)
|
||||
return schema
|
||||
|
||||
|
||||
@ -74,7 +74,8 @@ class ScanCommand(commands.Command):
|
||||
uris_to_update = set()
|
||||
uris_to_remove = set()
|
||||
|
||||
file_mtimes, file_errors = path.find_mtimes(media_dir)
|
||||
file_mtimes, file_errors = path.find_mtimes(
|
||||
media_dir, follow=config['local']['scan_follow_symlinks'])
|
||||
|
||||
logger.info('Found %d files in media_dir.', len(file_mtimes))
|
||||
|
||||
|
||||
@ -6,6 +6,7 @@ data_dir = $XDG_DATA_DIR/mopidy/local
|
||||
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
|
||||
scan_timeout = 1000
|
||||
scan_flush_threshold = 1000
|
||||
scan_follow_symlinks = false
|
||||
excluded_file_extensions =
|
||||
.directory
|
||||
.html
|
||||
|
||||
Loading…
Reference in New Issue
Block a user