From a72c9c88c9e4c71382a96d320cea9e6ca9036d71 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 24 Apr 2015 23:51:14 +0200 Subject: [PATCH 1/6] http: Handle getting correct IOLoop when running on tornado < 3.0 --- docs/changelog.rst | 8 ++++++++ mopidy/http/handlers.py | 6 +++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 3b0336a0..123ca456 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,6 +4,14 @@ Changelog This changelog is used to track all major changes to Mopidy. +v1.0.2 (unreleased) +=================== + +Bug fix release. + +- HTTP: Make event broadcasts work with Tornado 2.3, the previous threading fix + broke this. + v1.0.1 (2015-04-23) =================== diff --git a/mopidy/http/handlers.py b/mopidy/http/handlers.py index 4f4b5988..e2faa944 100644 --- a/mopidy/http/handlers.py +++ b/mopidy/http/handlers.py @@ -88,9 +88,13 @@ class WebSocketHandler(tornado.websocket.WebSocketHandler): @classmethod def broadcast(cls, msg): + if hasattr(tornado.ioloop.IOLoop, 'current'): + loop = tornado.ioloop.IOLoop.current() + else: + loop = tornado.ioloop.IOLoop.instance() # Fallback for 2.3 + # This can be called from outside the Tornado ioloop, so we need to # safely cross the thread boundary by adding a callback to the loop. - loop = tornado.ioloop.IOLoop.current() for client in cls.clients: # One callback per client to keep time we hold up the loop short loop.add_callback(_send_broadcast, client, msg) From b80361ccb2fd2bb3e1f6b3132b2e0d848d54c6d9 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 26 Apr 2015 23:07:10 +0200 Subject: [PATCH 2/6] audio: Increase per tee branch buffer size. Fixes #1147 --- docs/changelog.rst | 4 ++++ mopidy/audio/actor.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 123ca456..7dd2101a 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -12,6 +12,10 @@ Bug fix release. - HTTP: Make event broadcasts work with Tornado 2.3, the previous threading fix broke this. +- Audio: Fix for :issue:`1097` tuned down the buffer size in the queue. Turns + out this can cause distortions in certain cases. Give this an other go with + a more generous buffer size. (Fixes: :issue:`1147`) + v1.0.1 (2015-04-23) =================== diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index e0a7892a..3198c006 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -164,7 +164,7 @@ class _Outputs(gst.Bin): # All tee branches need a queue in front of them. # But keep the queue short so the volume change isn't to slow: queue = gst.element_factory_make('queue') - queue.set_property('max-size-buffers', 5) + queue.set_property('max-size-buffers', 15) self.add(element) self.add(queue) queue.link(element) From e53bf561155b0aefb945bc00cc0060285f2850ca Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Sun, 26 Apr 2015 23:15:03 +0200 Subject: [PATCH 3/6] audio: Make sure software mixer emits mute events. Turns out that gobject.GObject.set_property does not have a return value. --- docs/changelog.rst | 3 +++ mopidy/audio/actor.py | 8 +++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 7dd2101a..e10165ac 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -16,6 +16,9 @@ Bug fix release. out this can cause distortions in certain cases. Give this an other go with a more generous buffer size. (Fixes: :issue:`1147`) +- Audio: Make sure mute events get emitted by software mixer. + (Fixes: :issue:`1146`) + v1.0.1 (2015-04-23) =================== diff --git a/mopidy/audio/actor.py b/mopidy/audio/actor.py index 3198c006..45ad73ff 100644 --- a/mopidy/audio/actor.py +++ b/mopidy/audio/actor.py @@ -194,16 +194,14 @@ class SoftwareMixer(object): def set_volume(self, volume): self._element.set_property('volume', volume / 100.0) - self._mixer.trigger_volume_changed(volume) + self._mixer.trigger_volume_changed(self.get_volume()) def get_mute(self): return self._element.get_property('mute') def set_mute(self, mute): - result = self._element.set_property('mute', bool(mute)) - if result: - self._mixer.trigger_mute_changed(bool(mute)) - return result + self._element.set_property('mute', bool(mute)) + self._mixer.trigger_mute_changed(self.get_mute()) class _Handler(object): From 651e89357f2b46285088d8bbfb47b4220d9124e5 Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Fri, 24 Apr 2015 19:26:02 +0200 Subject: [PATCH 4/6] tests: Fix IssueGH1120RegressionTest flakiness --- tests/mpd/protocol/test_regression.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/mpd/protocol/test_regression.py b/tests/mpd/protocol/test_regression.py index 60a71ee8..a31258ab 100644 --- a/tests/mpd/protocol/test_regression.py +++ b/tests/mpd/protocol/test_regression.py @@ -197,7 +197,7 @@ class IssueGH1120RegressionTest(protocol.BaseTestCase): 'dummy:/': [Ref.playlist(name='Top 100 tracks', uri='dummy:/1')], } self.backend.playlists.set_dummy_playlists([ - Playlist(name='Top 100 tracks', uri='dummy:/1'), + Playlist(name='Top 100 tracks', uri='dummy:/1', last_modified=123), ]) response1 = self.send_request('lsinfo "/"') From 31a1cb91288f7ea54226b4a1f7990172fe155e34 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 27 Apr 2015 00:00:10 +0200 Subject: [PATCH 5/6] docs: Update changelog for v1.0.2 --- docs/changelog.rst | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index e10165ac..f4b796d7 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -4,20 +4,21 @@ Changelog This changelog is used to track all major changes to Mopidy. -v1.0.2 (unreleased) + +v1.0.2 (2015-04-27) =================== Bug fix release. -- HTTP: Make event broadcasts work with Tornado 2.3, the previous threading fix - broke this. +- HTTP: Make event broadcasts work with Tornado 2.3 again. The threading fix + in v1.0.1 broke this. - Audio: Fix for :issue:`1097` tuned down the buffer size in the queue. Turns out this can cause distortions in certain cases. Give this an other go with - a more generous buffer size. (Fixes: :issue:`1147`) + a more generous buffer size. (Fixes: :issue:`1147`, PR: :issue:`1152`) - Audio: Make sure mute events get emitted by software mixer. - (Fixes: :issue:`1146`) + (Fixes: :issue:`1146`, PR: :issue:`1152`) v1.0.1 (2015-04-23) From 21289f8fe5672bfbe70d481f17ae1d4b646b75f0 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Mon, 27 Apr 2015 00:02:12 +0200 Subject: [PATCH 6/6] Bump version to 1.0.2 --- mopidy/__init__.py | 2 +- tests/test_version.py | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 8dff0012..cabe0012 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -30,4 +30,4 @@ except ImportError: warnings.filterwarnings('ignore', 'could not open display') -__version__ = '1.0.1' +__version__ = '1.0.2' diff --git a/tests/test_version.py b/tests/test_version.py index 3d284121..6071e2cd 100644 --- a/tests/test_version.py +++ b/tests/test_version.py @@ -56,5 +56,6 @@ class VersionTest(unittest.TestCase): self.assertVersionLess('0.19.3', '0.19.4') self.assertVersionLess('0.19.4', '0.19.5') self.assertVersionLess('0.19.5', '1.0.0') - self.assertVersionLess('1.0.0', __version__) - self.assertVersionLess(__version__, '1.0.2') + self.assertVersionLess('1.0.0', '1.0.1') + self.assertVersionLess('1.0.1', __version__) + self.assertVersionLess(__version__, '1.0.3')