Merge branch 'v1.0.x' of github.com:mopidy/mopidy into v1.0.x
Conflicts: docs/changelog.rst
This commit is contained in:
commit
9d087ff94d
@ -13,6 +13,9 @@ Bug fix release.
|
|||||||
- Core/MPD/Local: Add support for ``title`` in
|
- Core/MPD/Local: Add support for ``title`` in
|
||||||
:meth:`mopidy.core.LibraryController.get_distinct`. (Fixes: :issue:`1181`)
|
:meth:`mopidy.core.LibraryController.get_distinct`. (Fixes: :issue:`1181`)
|
||||||
|
|
||||||
|
- Core: Make sure track changes make it to audio while paused.
|
||||||
|
(Fixes: :issuse:`1177`)
|
||||||
|
|
||||||
v1.0.5 (2015-05-19)
|
v1.0.5 (2015-05-19)
|
||||||
===================
|
===================
|
||||||
|
|
||||||
|
|||||||
@ -198,6 +198,12 @@ class PlaybackController(object):
|
|||||||
if old_state == PlaybackState.PLAYING:
|
if old_state == PlaybackState.PLAYING:
|
||||||
self._play(on_error_step=on_error_step)
|
self._play(on_error_step=on_error_step)
|
||||||
elif old_state == PlaybackState.PAUSED:
|
elif old_state == PlaybackState.PAUSED:
|
||||||
|
# NOTE: this is just a quick hack to fix #1177 as this code has
|
||||||
|
# already been killed in the gapless branch.
|
||||||
|
backend = self._get_backend()
|
||||||
|
if backend:
|
||||||
|
backend.playback.prepare_change()
|
||||||
|
backend.playback.change_track(tl_track.track).get()
|
||||||
self.pause()
|
self.pause()
|
||||||
|
|
||||||
# TODO: this is not really end of track, this is on_need_next_track
|
# TODO: this is not really end of track, this is on_need_next_track
|
||||||
|
|||||||
@ -668,3 +668,27 @@ class CorePlaybackWithOldBackendTest(unittest.TestCase):
|
|||||||
c = core.Core(mixer=None, backends=[b])
|
c = core.Core(mixer=None, backends=[b])
|
||||||
c.tracklist.add([Track(uri='dummy1:a', length=40000)])
|
c.tracklist.add([Track(uri='dummy1:a', length=40000)])
|
||||||
c.playback.play() # No TypeError == test passed.
|
c.playback.play() # No TypeError == test passed.
|
||||||
|
b.playback.play.assert_called_once_with()
|
||||||
|
|
||||||
|
|
||||||
|
class Bug1177RegressionTest(unittest.TestCase):
|
||||||
|
def test(self):
|
||||||
|
b = mock.Mock()
|
||||||
|
b.uri_schemes.get.return_value = ['dummy']
|
||||||
|
b.playback = mock.Mock(spec=backend.PlaybackProvider)
|
||||||
|
b.playback.change_track.return_value.get.return_value = True
|
||||||
|
b.playback.play.return_value.get.return_value = True
|
||||||
|
|
||||||
|
track1 = Track(uri='dummy:a', length=40000)
|
||||||
|
track2 = Track(uri='dummy:b', length=40000)
|
||||||
|
|
||||||
|
c = core.Core(mixer=None, backends=[b])
|
||||||
|
c.tracklist.add([track1, track2])
|
||||||
|
|
||||||
|
c.playback.play()
|
||||||
|
b.playback.change_track.assert_called_once_with(track1)
|
||||||
|
b.playback.change_track.reset_mock()
|
||||||
|
|
||||||
|
c.playback.pause()
|
||||||
|
c.playback.next()
|
||||||
|
b.playback.change_track.assert_called_once_with(track2)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user