stream: Ignore file protocol if Mopidy-File is enabled
If Mopidy-File is enabled it handles playback of file:// URIs. Mopidy-Stream used to do this, but in Mopidy 1.1 we removed "file" from the default value of the stream/protocols config. However, many users upgrading to Mopidy 1.1 have set stream/protocols to include "file" in their existing config, and thus Mopidy fails to start because both backends tries to claim the "file" protocol. Fixes #1248
This commit is contained in:
parent
9f08bce6cd
commit
9a83a2d707
@ -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):
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user