diff --git a/MANIFEST.in b/MANIFEST.in index 6235b2c8..cb752f87 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,4 +1,5 @@ -include COPYING -include *.rst -include requirements*.txt -recursive-include docs *.rst +include COPYING pylintrc *.rst *.txt +recursive-include docs * +prune docs/_build +recursive-include tests *.py +recursive-include tests/data * diff --git a/docs/changes.rst b/docs/changes.rst index 2cb979c5..b9981c53 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,10 +4,30 @@ Changes This change log is used to track all major changes to Mopidy. -0.1.0a3 (unreleased) + +0.1.0a4 (in development) +======================== + +Another great release. + +**Changes** + +- Exit early if not Python >= 2.6, < 3. +- Include Sphinx scripts for building docs, pylintrc, tests and test data in + the packages created by ``setup.py`` for i.e. PyPI. + + +0.1.0a3 (2010-08-03) ==================== -We got an updated :doc:`release roadmap `! +In the last two months, Mopidy's MPD frontend has gotten lots of stability +fixes and error handling improvements, proper support for having the same track +multiple times in a playlist, and support for IPv6. We have also fixed the +choppy playback on the libspotify backend. For the road ahead of us, we got an +updated :doc:`release roadmap ` with our goals for the 0.1 +to 0.3 releases. + +Enjoy the best alpha relase of Mopidy ever :-) **Changes** diff --git a/mopidy/__init__.py b/mopidy/__init__.py index 707e8f03..13ce67c8 100644 --- a/mopidy/__init__.py +++ b/mopidy/__init__.py @@ -1,7 +1,11 @@ +import sys +if not (2, 6) <= sys.version_info < (3,): + sys.exit(u'Mopidy requires Python >= 2.6, < 3') + from mopidy import settings as raw_settings def get_version(): - return u'0.1.0a3' + return u'0.1.0a4' def get_mpd_protocol_version(): return u'0.16.0' diff --git a/mopidy/mpd/frontend.py b/mopidy/mpd/frontend.py index 4aa99244..da4a96c1 100644 --- a/mopidy/mpd/frontend.py +++ b/mopidy/mpd/frontend.py @@ -312,19 +312,19 @@ class MpdFrontend(object): end = int(end) else: end = len(self.backend.current_playlist.tracks) - tracks = self.backend.current_playlist.tracks[start:end] - if not tracks: + cp_tracks = self.backend.current_playlist.cp_tracks[start:end] + if not cp_tracks: raise MpdArgError(u'Bad song index', command=u'delete') - for track in tracks: - self.backend.current_playlist.remove(id=track.id) + for (cpid, track) in cp_tracks: + self.backend.current_playlist.remove(cpid=cpid) @handle_pattern(r'^delete "(?P\d+)"$') def _current_playlist_delete_songpos(self, songpos): """See :meth:`_current_playlist_delete_range`""" try: songpos = int(songpos) - track = self.backend.current_playlist.tracks[songpos] - self.backend.current_playlist.remove(id=track.id) + (cpid, track) = self.backend.current_playlist.cp_tracks[songpos] + self.backend.current_playlist.remove(cpid=cpid) except IndexError: raise MpdArgError(u'Bad song index', command=u'delete') @@ -496,6 +496,7 @@ class MpdFrontend(object): return self.backend.current_playlist.mpd_format(start, end) @handle_pattern(r'^playlistsearch "(?P[^"]+)" "(?P[^"]+)"$') + @handle_pattern(r'^playlistsearch (?P\S+) "(?P[^"]+)"$') def _current_playlist_playlistsearch(self, tag, needle): """ *musicpd.org, current playlist section:* @@ -504,6 +505,11 @@ class MpdFrontend(object): Searches case-sensitively for partial matches in the current playlist. + + *GMPC:* + + - does not add quotes around the tag + - uses ``filename`` and ``any`` as tags """ raise MpdNotImplemented # TODO @@ -540,10 +546,10 @@ class MpdFrontend(object): # XXX Naive implementation that returns all tracks as changed if int(version) != self.backend.current_playlist.version: result = [] - for position, track in enumerate( - self.backend.current_playlist.tracks): + for (position, (cpid, track)) in enumerate( + self.backend.current_playlist.cp_tracks): result.append((u'cpos', position)) - result.append((u'Id', track.id)) + result.append((u'Id', cpid)) return result @handle_pattern(r'^shuffle$') diff --git a/tests/mpd/current_playlist_test.py b/tests/mpd/current_playlist_test.py index 5a7b6ca4..e8dd9748 100644 --- a/tests/mpd/current_playlist_test.py +++ b/tests/mpd/current_playlist_test.py @@ -304,7 +304,11 @@ class CurrentPlaylistHandlerTest(unittest.TestCase): self.assert_(u'OK' in result) def test_playlistsearch(self): - result = self.h.handle_request(u'playlistsearch "tag" "needle"') + result = self.h.handle_request(u'playlistsearch "any" "needle"') + self.assert_(u'ACK [0@0] {} Not implemented' in result) + + def test_playlistsearch_without_quotes(self): + result = self.h.handle_request(u'playlistsearch any "needle"') self.assert_(u'ACK [0@0] {} Not implemented' in result) def test_plchanges(self): @@ -317,15 +321,17 @@ class CurrentPlaylistHandlerTest(unittest.TestCase): self.assert_(u'OK' in result) def test_plchangesposid(self): - self.b.current_playlist.load( - [Track(id=11), Track(id=12), Track(id=13)]) + self.b.current_playlist.load([Track(), Track(), Track()]) result = self.h.handle_request(u'plchangesposid "0"') self.assert_(u'cpos: 0' in result) - self.assert_(u'Id: 11' in result) + self.assert_(u'Id: %d' % self.b.current_playlist.cp_tracks[0][0] + in result) self.assert_(u'cpos: 2' in result) - self.assert_(u'Id: 12' in result) + self.assert_(u'Id: %d' % self.b.current_playlist.cp_tracks[1][0] + in result) self.assert_(u'cpos: 2' in result) - self.assert_(u'Id: 13' in result) + self.assert_(u'Id: %d' % self.b.current_playlist.cp_tracks[2][0] + in result) self.assert_(u'OK' in result) def test_shuffle_without_range(self): diff --git a/tests/version_test.py b/tests/version_test.py index 5831d119..6ab3ee2f 100644 --- a/tests/version_test.py +++ b/tests/version_test.py @@ -10,7 +10,8 @@ class VersionTest(unittest.TestCase): def test_versions_can_be_strictly_ordered(self): self.assert_(SV('0.1.0a0') < SV('0.1.0a1')) self.assert_(SV('0.1.0a2') < SV(get_version())) - self.assert_(SV(get_version()) < SV('0.1.0a4')) + self.assert_(SV('0.1.0a3') < SV(get_version())) + self.assert_(SV(get_version()) < SV('0.1.0a5')) self.assert_(SV('0.1.0a0') < SV('0.1.0')) self.assert_(SV('0.1.0') < SV('0.1.1')) self.assert_(SV('0.1.1') < SV('0.2.0'))