From 9a83a2d707bd430a0529b1ae889ec1e8b9604f04 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 15 Aug 2015 22:34:59 +0200 Subject: [PATCH 1/2] 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 --- mopidy/stream/actor.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mopidy/stream/actor.py b/mopidy/stream/actor.py index ae5be8e0..cc9632d5 100644 --- a/mopidy/stream/actor.py +++ b/mopidy/stream/actor.py @@ -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): From 3dfa39adb04b5e675e1ebe0c312bbfb3240f6a05 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 15 Aug 2015 22:50:48 +0200 Subject: [PATCH 2/2] docs: Add #1248/#1254 to changelog --- docs/changelog.rst | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 75fdc538..24bc7682 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,19 @@ Changelog This changelog is used to track all major changes to Mopidy. + +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`) + + v1.1.0 (2015-08-09) ===================