From 0c845dd246ec270aaf38e7166319631599e13c36 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Sat, 26 Feb 2011 17:23:15 +0100 Subject: [PATCH 1/7] Add Tox for testing on both Python 2.6 and 2.7 --- .gitignore | 1 + requirements/tests.txt | 1 + tox.ini | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 tox.ini 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/requirements/tests.txt b/requirements/tests.txt index 33f49451..71dab096 100644 --- a/requirements/tests.txt +++ b/requirements/tests.txt @@ -1,2 +1,3 @@ coverage 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 From ab1f9d0cc6ca6ae6cbdf7ebf570c26166af889af Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 9 Mar 2011 09:45:48 +0100 Subject: [PATCH 2/7] Add Spotify URI to loading tracks so they can be played --- mopidy/backends/spotify/translator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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: From e0b212a275edbbf9552049aa32d08d988ba262bf Mon Sep 17 00:00:00 2001 From: Antoine Pierlot-Garcin Date: Wed, 30 Mar 2011 00:49:51 -0400 Subject: [PATCH 3/7] Spotify backend: better error handling. --- mopidy/backends/spotify/session_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mopidy/backends/spotify/session_manager.py b/mopidy/backends/spotify/session_manager.py index 9736f2eb..7ed12ada 100644 --- a/mopidy/backends/spotify/session_manager.py +++ b/mopidy/backends/spotify/session_manager.py @@ -34,6 +34,9 @@ class SpotifySessionManager(spotify.manager.SpotifySessionManager, BaseThread): 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: @@ -55,7 +58,7 @@ class SpotifySessionManager(spotify.manager.SpotifySessionManager, BaseThread): 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""" From 4c5db1e25e429bf8e4836b7b87109b813604ed75 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 30 Mar 2011 19:35:33 +0200 Subject: [PATCH 4/7] docs: How to turn off 'idle' use ncmpcpp --- docs/clients/mpd.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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 ================= From 36b9c1af193b83a76f5ebdc0c628cb3cc22ab19a Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 30 Mar 2011 20:14:58 +0200 Subject: [PATCH 5/7] Update changelog with fixes by bok --- docs/changes.rst | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/docs/changes.rst b/docs/changes.rst index bd102ef7..b33f3432 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. + - MPD frontend: - Add support for "date" queries to both the ``find`` and ``search`` From dff599372703150b1d6e840a04601d95716c19b3 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 30 Mar 2011 20:18:04 +0200 Subject: [PATCH 6/7] Add Github issue reference --- docs/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index b33f3432..2bec7719 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -26,7 +26,7 @@ No description yet. 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. + Pierlot-Garcin for patches to Mopidy and Pyspotify. (Fixes: :GH:`77`) - MPD frontend: From 3aded359c5e6017beb0b8772daecb11624821753 Mon Sep 17 00:00:00 2001 From: Stein Magnus Jodal Date: Wed, 30 Mar 2011 20:21:56 +0200 Subject: [PATCH 7/7] Fix error in issue reference --- docs/changes.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 2bec7719..4d6c6524 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -26,7 +26,7 @@ No description yet. 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: :GH:`77`) + Pierlot-Garcin for patches to Mopidy and Pyspotify. (Fixes: :issue:`77`) - MPD frontend: