Merge remote branch 'mopidy/develop' into feature/pykka-actors

This commit is contained in:
Stein Magnus Jodal 2011-03-31 09:05:59 +02:00
commit b0f92af157
7 changed files with 52 additions and 3 deletions

1
.gitignore vendored
View File

@ -2,6 +2,7 @@
*.swp
.coverage
.noseids
.tox
MANIFEST
build/
cover/

View File

@ -11,8 +11,23 @@ This change log is used to track all major changes to Mopidy.
No description yet.
**Important changes**
- If you use the Spotify backend, you *should* upgrade to libspotify 0.0.7 and
the latest pyspotify from the Mopidy developers. Follow the instructions at
:doc:`/installation/libspotify/`.
**Changes**
- Spotify backend:
- Fixed a segmentation fault due to a bug in Pyspotify. Thanks to Antoine
Pierlot-Garcin for patches to Pyspotify.
- Better error messages on wrong login or network problems. Thanks to Antoine
Pierlot-Garcin for patches to Mopidy and Pyspotify. (Fixes: :issue:`77`)
- MPD frontend:
- Add support for "date" queries to both the ``find`` and ``search``

View File

@ -31,6 +31,9 @@ ncmpcpp
A console client that generally works well with Mopidy, and is regularly used
by Mopidy developers.
Search
^^^^^^
Search only works for ncmpcpp versions 0.5.1 and higher, and in two of the
three search modes:
@ -42,6 +45,19 @@ three search modes:
If you run Ubuntu 10.04 or older, you can fetch an updated version of ncmpcpp
from `Launchpad <https://launchpad.net/ubuntu/+source/ncmpcpp>`_.
Communication mode
^^^^^^^^^^^^^^^^^^
In newer versions of ncmpcpp, like 0.5.5 shipped with Ubuntu 11.04, ncmcpp
defaults to "notifications" mode for MPD communications, which Mopidy currently
does not support. To workaround this limitation in Mopidy, edit the ncmpcpp
configuration file at ``~/.ncmpcpp/config`` and add the following setting::
mpd_communication_mode = "polling"
You can track the development of "notifications" mode support in Mopidy in
:issue:`32`.
Graphical clients
=================

View File

@ -50,6 +50,9 @@ class SpotifySessionManager(BaseThread, PyspotifySessionManager):
def logged_in(self, session, error):
"""Callback used by pyspotify"""
if error:
logger.error(u'Spotify login error: %s', error)
return
logger.info(u'Connected to Spotify')
self.session = session
if settings.SPOTIFY_HIGH_BITRATE:
@ -71,7 +74,7 @@ class SpotifySessionManager(BaseThread, PyspotifySessionManager):
def connection_error(self, session, error):
"""Callback used by pyspotify"""
logger.error(u'Connection error: %s', error)
logger.error(u'Spotify connection error: %s', error)
def message_to_user(self, session, message):
"""Callback used by pyspotify"""

View File

@ -28,9 +28,9 @@ class SpotifyTranslator(object):
@classmethod
def to_mopidy_track(cls, spotify_track):
if not spotify_track.is_loaded():
return Track(name=u'[loading...]')
uri = str(Link.from_track(spotify_track, 0))
if not spotify_track.is_loaded():
return Track(uri=uri, name=u'[loading...]')
if dt.MINYEAR <= int(spotify_track.album().year()) <= dt.MAXYEAR:
date = dt.date(spotify_track.album().year(), 1, 1)
else:

View File

@ -1,3 +1,4 @@
coverage
mock
nose
tox

13
tox.ini Normal file
View File

@ -0,0 +1,13 @@
[tox]
envlist = py26,py27,docs
[testenv]
deps = nose
commands = nosetests []
[testenv:docs]
basepython = python
changedir = docs
deps = sphinx
commands =
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html