diff --git a/.gitignore b/.gitignore index 17a6200d..3fed7452 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ *.swp .coverage .noseids +.tox MANIFEST build/ cover/ diff --git a/docs/changes.rst b/docs/changes.rst index bd102ef7..4d6c6524 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -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`` diff --git a/docs/clients/mpd.rst b/docs/clients/mpd.rst index e27aa446..f5066210 100644 --- a/docs/clients/mpd.rst +++ b/docs/clients/mpd.rst @@ -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 `_. +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 ================= diff --git a/mopidy/backends/spotify/session_manager.py b/mopidy/backends/spotify/session_manager.py index 398e24fe..e92fe89e 100644 --- a/mopidy/backends/spotify/session_manager.py +++ b/mopidy/backends/spotify/session_manager.py @@ -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""" diff --git a/mopidy/backends/spotify/translator.py b/mopidy/backends/spotify/translator.py index 50ee07d1..d81622f9 100644 --- a/mopidy/backends/spotify/translator.py +++ b/mopidy/backends/spotify/translator.py @@ -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: diff --git a/requirements/tests.txt b/requirements/tests.txt index fb54268f..f8cf2eb3 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,3 +1,4 @@ coverage mock nose +tox diff --git a/tox.ini b/tox.ini new file mode 100644 index 00000000..8b91c6b7 --- /dev/null +++ b/tox.ini @@ -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