Merge pull request #1254 from jodal/feature/stream-without-file-protocol

stream: Ignore file protocol if Mopidy-File is enabled
This commit is contained in:
Thomas Adamcik 2015-08-16 00:06:52 +02:00
commit 43e66891bd
2 changed files with 13 additions and 0 deletions

View File

@ -10,6 +10,12 @@ v1.1.1 (UNRELEASED)
Bug fix release.
- Stream: If "file" is present in the :confval:`stream/protocols` config value
and the :ref:`ext-file` extension is enabled, we exited with an error because
two extensions claimed the same URI scheme. We now log a warning recommending
to remove "file" from the :confval:`stream/protocols` config, and then
proceed startup. (Fixes: :issue:`1248`, PR: :issue:`1254`)
- File: Adjust log levels when failing to expand ``$XDG_MUSIC_DIR`` into a real
path. This usually happens when running Mopidy as a system service, and thus
with a limited set of environment variables. (Fixes: :issue:`1249`, PR:

View File

@ -36,6 +36,13 @@ class StreamBackend(pykka.ThreadingActor, backend.Backend):
self.uri_schemes = audio_lib.supported_uri_schemes(
config['stream']['protocols'])
if 'file' in self.uri_schemes and config['file']['enabled']:
logger.warning(
'The stream/protocols config value includes the "file" '
'protocol. "file" playback is now handled by Mopidy-File. '
'Please remove it from the stream/protocols config.')
self.uri_schemes -= {'file'}
class StreamLibraryProvider(backend.LibraryProvider):