Release v0.8.1

This commit is contained in:
Stein Magnus Jodal 2012-10-30 17:58:23 +01:00
commit cae72626c9
13 changed files with 65 additions and 30 deletions

View File

@ -5,6 +5,27 @@ Changes
This change log is used to track all major changes to Mopidy.
v0.8.1 (2012-10-30)
===================
A small maintenance release to fix a bug introduced in 0.8.0 and update Mopidy
to work with Pykka 1.0.
**Dependencies**
- Pykka >= 1.0 is now required.
**Bug fixes**
- :issue:`213`: Fix "streaming task paused, reason not-negotiated" errors
observed by some users on some Spotify tracks due to a change introduced in
0.8.0. See the issue for a patch that applies to 0.8.0.
- :issue:`216`: Volume returned by the MPD command `status` contained a
floating point ``.0`` suffix. This bug was introduced with the large audio
outout and mixer changes in v0.8.0. It now returns an integer again.
v0.8.0 (2012-09-20)
===================

View File

@ -39,26 +39,11 @@ repository::
Installing GStreamer on OS X
============================
.. note::
We have been working with `Homebrew <https://github.com/mxcl/homebrew>`_ to
make all the GStreamer packages easily installable on OS X using Homebrew.
We've gotten most of our packages included, but the Homebrew guys aren't
very happy to include Python specific packages into Homebrew, even though
they are not installable by pip. If you're interested, see the discussion
in `Homebrew's issue #1612
<https://github.com/mxcl/homebrew/issues/issue/1612>`_ for details.
The following is currently the shortest path to installing GStreamer with
Python bindings on OS X using Homebrew.
We have been working with `Homebrew <https://github.com/mxcl/homebrew>`_ for a
to make all the GStreamer packages easily installable on OS X.
#. Install `Homebrew <https://github.com/mxcl/homebrew>`_.
#. Download our Homebrew formula for ``gst-python``::
curl -o $(brew --prefix)/Library/Formula/gst-python.rb \
https://raw.github.com/jodal/homebrew/gst-python/Library/Formula/gst-python.rb
#. Install the required packages::
brew install gst-python gst-plugins-good gst-plugins-ugly

View File

@ -26,7 +26,7 @@ dependencies installed.
- Python >= 2.6, < 3
- Pykka >= 0.12.3::
- Pykka >= 1.0::
sudo pip install -U pykka

View File

@ -1,6 +1,19 @@
# pylint: disable = E0611,F0401
from distutils.version import StrictVersion as SV
# pylint: enable = E0611,F0401
import sys
import pykka
if not (2, 6) <= sys.version_info < (3,):
sys.exit(u'Mopidy requires Python >= 2.6, < 3')
sys.exit(
u'Mopidy requires Python >= 2.6, < 3, but found %s' %
'.'.join(map(str, sys.version_info[:3])))
if (isinstance(pykka.__version__, basestring)
and not SV('1.0') <= SV(pykka.__version__) < SV('2.0')):
sys.exit(
u'Mopidy requires Pykka >= 1.0, < 2, but found %s' % pykka.__version__)
import os
import platform
@ -8,7 +21,7 @@ from subprocess import PIPE, Popen
import glib
__version__ = '0.8.0'
__version__ = '0.8.1'
DATA_PATH = os.path.join(str(glib.get_user_data_dir()), 'mopidy')
CACHE_PATH = os.path.join(str(glib.get_user_cache_dir()), 'mopidy')

View File

@ -70,6 +70,21 @@ class Audio(ThreadingActor):
fakesink = gst.element_factory_make('fakesink')
self._playbin.set_property('video-sink', fakesink)
self._playbin.connect('notify::source', self._on_new_source)
def _on_new_source(self, element, pad):
uri = element.get_property('uri')
if not uri or not uri.startswith('appsrc://'):
return
# These caps matches the audio data provided by libspotify
default_caps = gst.Caps(
'audio/x-raw-int, endianness=(int)1234, channels=(int)2, '
'width=(int)16, depth=(int)16, signed=(boolean)true, '
'rate=(int)44100')
source = element.get_property('source')
source.set_property('caps', default_caps)
def _teardown_playbin(self):
self._playbin.set_state(gst.STATE_NULL)

View File

@ -14,7 +14,7 @@ class DummyBackend(ThreadingActor, base.Backend):
"""
def __init__(self, *args, **kwargs):
super(DummyBackend, self).__init__(*args, **kwargs)
super(DummyBackend, self).__init__()
self.current_playlist = core.CurrentPlaylistController(backend=self)

View File

@ -32,7 +32,7 @@ class LocalBackend(ThreadingActor, base.Backend):
"""
def __init__(self, *args, **kwargs):
super(LocalBackend, self).__init__(*args, **kwargs)
super(LocalBackend, self).__init__()
self.current_playlist = core.CurrentPlaylistController(backend=self)

View File

@ -47,7 +47,7 @@ class SpotifyBackend(ThreadingActor, base.Backend):
from .playback import SpotifyPlaybackProvider
from .stored_playlists import SpotifyStoredPlaylistsProvider
super(SpotifyBackend, self).__init__(*args, **kwargs)
super(SpotifyBackend, self).__init__()
self.current_playlist = core.CurrentPlaylistController(backend=self)

View File

@ -24,7 +24,7 @@ def rescale(v, old=None, new=None):
new_min, new_max = new
old_min, old_max = old
scaling = float(new_max - new_min) / (old_max - old_min)
return round(scaling * (v - old_min) + new_min)
return int(round(scaling * (v - old_min) + new_min))
def import_module(name):

View File

@ -250,7 +250,7 @@ class Connection(object):
return True
try:
self.actor_ref.send_one_way({'received': data})
self.actor_ref.tell({'received': data})
except ActorDeadError:
self.stop(u'Actor is dead.')

View File

@ -1 +1 @@
Pykka >= 0.12.3
Pykka >= 1.0

View File

@ -383,14 +383,14 @@ class ConnectionTest(unittest.TestCase):
self.assertTrue(network.Connection.recv_callback(
self.mock, sentinel.fd, gobject.IO_IN))
self.mock.actor_ref.send_one_way.assert_called_once_with(
self.mock.actor_ref.tell.assert_called_once_with(
{'received': 'data'})
def test_recv_callback_handles_dead_actors(self):
self.mock.sock = Mock(spec=socket.SocketType)
self.mock.sock.recv.return_value = 'data'
self.mock.actor_ref = Mock()
self.mock.actor_ref.send_one_way.side_effect = pykka.ActorDeadError()
self.mock.actor_ref.tell.side_effect = pykka.ActorDeadError()
self.assertTrue(network.Connection.recv_callback(
self.mock, sentinel.fd, gobject.IO_IN))

View File

@ -28,8 +28,9 @@ class VersionTest(unittest.TestCase):
self.assert_(SV('0.7.0') < SV('0.7.1'))
self.assert_(SV('0.7.1') < SV('0.7.2'))
self.assert_(SV('0.7.2') < SV('0.7.3'))
self.assert_(SV('0.7.3') < SV(__version__))
self.assert_(SV(__version__) < SV('0.8.1'))
self.assert_(SV('0.7.3') < SV('0.8.0'))
self.assert_(SV('0.8.0') < SV(__version__))
self.assert_(SV(__version__) < SV('0.8.2'))
def test_get_platform_contains_platform(self):
self.assertIn(platform.platform(), get_platform())