diff --git a/docs/changelog.rst b/docs/changelog.rst index 31de2597..5abee98c 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -14,6 +14,9 @@ Bug fix release. example Ogg Vorbis has the MIME type ``application/ogg``. (Fixes: :issue:`1299`) +- Local: If the scan or clear commands are used on a library that does not + exist, exit with an error. (Fixes: :issue:`1298`) + v1.2.0 (UNRELEASED) =================== diff --git a/docs/command.rst b/docs/command.rst index ea9ccce7..58b6bf63 100644 --- a/docs/command.rst +++ b/docs/command.rst @@ -111,7 +111,7 @@ To start the music server, run:: mopidy -To start the server with an additional config file than can override configs +To start the server with an additional config file, that can override configs set in the default config files, run:: mopidy --config ./my-config.conf diff --git a/docs/ext/web.rst b/docs/ext/web.rst index 8204a3ab..ddf1d92a 100644 --- a/docs/ext/web.rst +++ b/docs/ext/web.rst @@ -145,6 +145,20 @@ To install, run:: pip install Mopidy-Party +Mopidy-Party +============ + +https://github.com/Lesterpig/mopidy-party + +Minimal web client designed for collaborative music management during parties. + +.. image:: /ext/mopidy_party.png + +To install, run:: + + pip install Mopidy-Party + + Mopidy-Simple-Webclient ======================= diff --git a/mopidy/local/commands.py b/mopidy/local/commands.py index 7033f3aa..d61cf441 100644 --- a/mopidy/local/commands.py +++ b/mopidy/local/commands.py @@ -21,8 +21,8 @@ def _get_library(args, config): library_name = config['local']['library'] if library_name not in libraries: - logger.warning('Local library %s not found', library_name) - return 1 + logger.error('Local library %s not found', library_name) + return None logger.debug('Using %s as the local library', library_name) return libraries[library_name](config) @@ -41,6 +41,9 @@ class ClearCommand(commands.Command): def run(self, args, config): library = _get_library(args, config) + if library is None: + return 1 + prompt = '\nAre you sure you want to clear the library? [y/N] ' if compat.input(prompt).lower() != 'y': @@ -76,6 +79,8 @@ class ScanCommand(commands.Command): bytes(file_ext.lower()) for file_ext in excluded_file_extensions) library = _get_library(args, config) + if library is None: + return 1 file_mtimes, file_errors = path.find_mtimes( media_dir, follow=config['local']['scan_follow_symlinks'])