From 046673e275cefcfff822e32665711a7a88c53254 Mon Sep 17 00:00:00 2001 From: kaliko Date: Fri, 11 Jan 2019 16:15:56 +0100 Subject: [PATCH 1/5] Update mpd.rst Update MPD Website URL --- docs/ext/mpd.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/ext/mpd.rst b/docs/ext/mpd.rst index db56187f..3e146f88 100644 --- a/docs/ext/mpd.rst +++ b/docs/ext/mpd.rst @@ -20,7 +20,7 @@ Mopidy and enabled by default. local network. You have been warned. MPD stands for Music Player Daemon, which is also the name of the `original MPD -server project `_. Mopidy does not depend on the +server project `_. Mopidy does not depend on the original MPD server, but implements the MPD protocol itself, and is thus compatible with clients for the original MPD server. From 84f231af96a7990ad8227a31c62d3580d7564341 Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Wed, 16 Jan 2019 01:48:30 +0000 Subject: [PATCH 2/5] docs: set 'async=false' for shout2send pipelines As part of #1528 --- docs/audio.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/audio.rst b/docs/audio.rst index cb4060b5..dda66a90 100644 --- a/docs/audio.rst +++ b/docs/audio.rst @@ -76,21 +76,21 @@ simultaneously. To use the Icecast output, do the following: .. code-block:: ini [audio] - output = lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme + output = lamemp3enc ! shout2send async=false mount=mopidy ip=127.0.0.1 port=8000 password=hackme Example for Ogg Vorbis streaming: .. code-block:: ini [audio] - output = audioresample ! audioconvert ! vorbisenc ! oggmux ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme + output = audioresample ! audioconvert ! vorbisenc ! oggmux ! shout2send async=false mount=mopidy ip=127.0.0.1 port=8000 password=hackme Example for MP3 streaming and local audio (multiple outputs): .. code-block:: ini [audio] - output = tee name=t ! queue ! audioresample ! autoaudiosink t. ! queue ! lamemp3enc ! shout2send mount=mopidy ip=127.0.0.1 port=8000 password=hackme + output = tee name=t ! queue ! audioresample ! autoaudiosink t. ! queue ! lamemp3enc ! shout2send async=false mount=mopidy ip=127.0.0.1 port=8000 password=hackme Other advanced setups are also possible for outputs. Basically, anything you can use with the ``gst-launch-1.0`` command can be plugged into From 5b32f8736485f95c6a5a88d5931b9e72ec54a392 Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Tue, 29 Jan 2019 17:15:51 +0000 Subject: [PATCH 3/5] test: flake8 to ignore camelcase usage in our deps. Ignore N813 when importing the c version of xml.etree.ElementTree. Ignore N815 when controlling failure diff length in unittest. --- mopidy/internal/playlists.py | 4 ++-- tests/config/test_config.py | 4 ++-- tests/core/test_playback.py | 2 +- tests/internal/test_path.py | 2 +- tests/local/test_json.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/mopidy/internal/playlists.py b/mopidy/internal/playlists.py index e80588c9..5c7c8fc4 100644 --- a/mopidy/internal/playlists.py +++ b/mopidy/internal/playlists.py @@ -6,9 +6,9 @@ from mopidy.compat import configparser from mopidy.internal import validation try: - import xml.etree.cElementTree as elementtree + import xml.etree.cElementTree as elementtree # noqa: N813 except ImportError: - import xml.etree.ElementTree as elementtree + import xml.etree.ElementTree as elementtree # noqa: N813 def parse(data): diff --git a/tests/config/test_config.py b/tests/config/test_config.py index fa2285b8..a20f2317 100644 --- a/tests/config/test_config.py +++ b/tests/config/test_config.py @@ -164,7 +164,7 @@ __HASH10__ = foo # = should all be treated as a comment.""" class PreProcessorTest(unittest.TestCase): - maxDiff = None # Show entire diff. + maxDiff = None # Show entire diff. # noqa: N815 def test_empty_config(self): result = config._preprocess('') @@ -230,7 +230,7 @@ class PreProcessorTest(unittest.TestCase): class PostProcessorTest(unittest.TestCase): - maxDiff = None # Show entire diff. + maxDiff = None # Show entire diff. # noqa: N815 def test_empty_config(self): result = config._postprocess('[__COMMENTS__]') diff --git a/tests/core/test_playback.py b/tests/core/test_playback.py index 6d320b4e..59d90b92 100644 --- a/tests/core/test_playback.py +++ b/tests/core/test_playback.py @@ -497,7 +497,7 @@ class TestCurrentAndPendingTlTrack(BaseTest): 'mopidy.core.playback.listener.CoreListener', spec=core.CoreListener) class EventEmissionTest(BaseTest): - maxDiff = None + maxDiff = None # noqa: N815 def test_play_when_stopped_emits_events(self, listener_mock): tl_tracks = self.core.tracklist.get_tl_tracks() diff --git a/tests/internal/test_path.py b/tests/internal/test_path.py index dec80f1a..2cfe4ebd 100644 --- a/tests/internal/test_path.py +++ b/tests/internal/test_path.py @@ -237,7 +237,7 @@ class ExpandPathTest(unittest.TestCase): class FindMTimesTest(unittest.TestCase): - maxDiff = None + maxDiff = None # noqa: N815 def setUp(self): # noqa: N802 self.tmpdir = tempfile.mkdtemp(b'.mopidy-tests') diff --git a/tests/local/test_json.py b/tests/local/test_json.py index 169ba743..8f46bd36 100644 --- a/tests/local/test_json.py +++ b/tests/local/test_json.py @@ -9,7 +9,7 @@ from tests import path_to_data_dir class BrowseCacheTest(unittest.TestCase): - maxDiff = None + maxDiff = None # noqa: N815 def setUp(self): # noqa: N802 self.uris = ['local:track:foo/bar/song1', From 7230aff07bd7ff214045a03b0a31a505783fa01e Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Thu, 31 Jan 2019 20:15:29 +0000 Subject: [PATCH 4/5] flake8: F632 use != to compare str --- mopidy/mpd/translator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mopidy/mpd/translator.py b/mopidy/mpd/translator.py index a76d6d59..d47c3703 100644 --- a/mopidy/mpd/translator.py +++ b/mopidy/mpd/translator.py @@ -108,7 +108,7 @@ def track_to_mpd_format(track, position=None, stream_title=None): if track.album and track.album.uri: result.append(('X-AlbumUri', track.album.uri)) if track.album and track.album.images: - images = ';'.join(i for i in track.album.images if i is not '') + images = ';'.join(i for i in track.album.images if i != '') result.append(('X-AlbumImage', images)) result = [element for element in result if _has_value(*element)] From 531c090da963ae195c17444b83769d2ba956fbe5 Mon Sep 17 00:00:00 2001 From: Nick Steel Date: Thu, 31 Jan 2019 21:56:42 +0000 Subject: [PATCH 5/5] test: Skips scanner tags test when there's no mp3 support. The file order returned by .find is not deterministic which made testing the first scanner result fail when it happened to be an unsupported media format (e.g. mp3). --- tests/audio/test_scan.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/audio/test_scan.py b/tests/audio/test_scan.py index 411ce805..8761f68a 100644 --- a/tests/audio/test_scan.py +++ b/tests/audio/test_scan.py @@ -45,6 +45,9 @@ class ScannerTest(unittest.TestCase): def test_tags_is_set(self): self.scan(self.find('scanner/simple')) + + self.check_if_missing_plugin() + self.assert_(self.result.values()[0].tags) def test_errors_is_not_set(self):