local: Rename scan_blacklist_extensions to excluded_file_extensions
This commit is contained in:
parent
3a1d4db227
commit
3884da2d7e
@ -52,9 +52,9 @@ Configuration values
|
|||||||
Number of milliseconds before giving up scanning a file and moving on to
|
Number of milliseconds before giving up scanning a file and moving on to
|
||||||
the next file.
|
the next file.
|
||||||
|
|
||||||
.. confval:: local/scan_blacklist_extensions
|
.. confval:: local/excluded_file_extensions
|
||||||
|
|
||||||
File extensions to ignore when scanning the media directory.
|
File extensions to exclude when scanning the media directory.
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
|||||||
@ -23,7 +23,7 @@ class Extension(ext.Extension):
|
|||||||
schema['tag_cache_file'] = config.Path()
|
schema['tag_cache_file'] = config.Path()
|
||||||
schema['scan_timeout'] = config.Integer(
|
schema['scan_timeout'] = config.Integer(
|
||||||
minimum=1000, maximum=1000*60*60)
|
minimum=1000, maximum=1000*60*60)
|
||||||
schema['scan_blacklist_extensions'] = config.List(optional=True)
|
schema['excluded_file_extensions'] = config.List(optional=True)
|
||||||
return schema
|
return schema
|
||||||
|
|
||||||
def validate_environment(self):
|
def validate_environment(self):
|
||||||
|
|||||||
@ -4,7 +4,7 @@ media_dir = $XDG_MUSIC_DIR
|
|||||||
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
|
playlists_dir = $XDG_DATA_DIR/mopidy/local/playlists
|
||||||
tag_cache_file = $XDG_DATA_DIR/mopidy/local/tag_cache
|
tag_cache_file = $XDG_DATA_DIR/mopidy/local/tag_cache
|
||||||
scan_timeout = 1000
|
scan_timeout = 1000
|
||||||
scan_blacklist_extensions =
|
excluded_file_extensions =
|
||||||
.jpeg
|
.jpeg
|
||||||
.jpg
|
.jpg
|
||||||
.png
|
.png
|
||||||
|
|||||||
@ -71,7 +71,7 @@ def main():
|
|||||||
local_updater = updaters.values()[0](config) # TODO: switch to actor?
|
local_updater = updaters.values()[0](config) # TODO: switch to actor?
|
||||||
|
|
||||||
media_dir = config['local']['media_dir']
|
media_dir = config['local']['media_dir']
|
||||||
blacklist_extensions = config['local']['scan_blacklist_extensions']
|
excluded_extensions = config['local']['excluded_file_extensions']
|
||||||
|
|
||||||
uris_library = set()
|
uris_library = set()
|
||||||
uris_update = set()
|
uris_update = set()
|
||||||
@ -93,8 +93,8 @@ def main():
|
|||||||
|
|
||||||
logging.info('Checking %s for new or modified tracks.', media_dir)
|
logging.info('Checking %s for new or modified tracks.', media_dir)
|
||||||
for uri in path.find_uris(config['local']['media_dir']):
|
for uri in path.find_uris(config['local']['media_dir']):
|
||||||
if os.path.splitext(path.uri_to_path(uri))[1] in blacklist_extensions:
|
if os.path.splitext(path.uri_to_path(uri))[1] in excluded_extensions:
|
||||||
logging.debug('Skipped %s: File extension blacklisted.', uri)
|
logging.debug('Skipped %s: File extension excluded.', uri)
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if uri not in uris_library:
|
if uri not in uris_library:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user