Stein Magnus Jodal
04788abaac
core: Change tracklist.{filter,remove} usage
...
The criterias are now a mapping between field names and one or more values.
This aligns tracklist.{filter,remove} with the API of
library.{find_exact,search}, and allows for e.g. batch removals.
An exception is raised immediately if the API is used in the old way to ease
migration and debugging.
2013-11-12 00:00:22 +01:00
Javier Domingo
a443348d4b
mpd: Don't decide the remove action
...
Those three lines shouldn't be there. That is tracklist/playback logic, not frontend logic. Indeed, care is already taken in core =)
2013-09-06 16:54:36 +02:00
Stein Magnus Jodal
f26db23de9
mpd: Use add(uri=uri) instead of add(lookup(uri))
2013-03-31 00:19:40 +01:00
Stein Magnus Jodal
bb32ff6b6b
mpd: Don't use the \S regexp group
2012-11-21 01:35:21 +01:00
Stein Magnus Jodal
09d7279b6b
mpd: Compile protocol matching regexpes
...
This caused a single test failure, which was fixed.
2012-11-21 01:13:05 +01:00
Stein Magnus Jodal
1ed56c9ed7
Use tracklist.add() instead of tracklist.append()
2012-11-20 21:55:51 +01:00
Stein Magnus Jodal
70dbf81191
mpd: Simplify 'addid' implementation using improved tracklist.add()
2012-11-20 21:55:51 +01:00
Stein Magnus Jodal
d107b13fcb
core: Remove playback.current_tlid
2012-11-20 21:48:19 +01:00
Stein Magnus Jodal
eab399357f
Make library.lookup() return a list of tracks
2012-11-19 21:09:10 +01:00
Stein Magnus Jodal
32639ea8de
Replace {tracklist,playlists}.get() with .filter() which always returns a list
2012-11-19 21:09:10 +01:00
Stein Magnus Jodal
dc356a81fd
Merge branch 'feature/rename-cp-to-tracklist' into develop
...
Conflicts:
docs/changes.rst
mopidy/frontends/mpd/protocol/current_playlist.py
2012-11-13 19:09:18 +01:00
Stein Magnus Jodal
487503b51c
mpd: Remove URI scheme check, as core handles that
2012-11-13 11:53:47 +01:00
Stein Magnus Jodal
bba9548b27
Rename 'current playlist' to 'tracklist'
2012-11-13 10:59:48 +01:00
Stein Magnus Jodal
6acaa490e9
Make all strings unicode by default ( fixes #224 )
2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
d985b8be38
Fix plchanges so it returns nothing when nothing has changed
2012-11-01 23:28:19 +01:00
Stein Magnus Jodal
666800ec57
Fix most flake8 warnings ( #211 )
2012-10-16 14:00:34 +02:00
Stein Magnus Jodal
2fb878df2e
MPD: Rename context.backend to context.core
2012-09-27 20:35:39 +02:00
Stein Magnus Jodal
2262bf91d5
Fix crash in 'playlistinfo' when called with a songpos not matching an CPID ( fixes #162 )
2012-08-24 00:21:03 +02:00
Stein Magnus Jodal
6e9dd194df
Use current_playlist.length instead of len(current_playlist.tracks)
2012-08-24 00:16:33 +02:00
Stein Magnus Jodal
b0698d2e0a
Add slice() method to CurrentPlaylistController to reduce copying of the playlist
2011-12-28 02:38:07 +01:00
Stein Magnus Jodal
4f8fbac44c
Use CurrentPlaylistController.length once more
2011-12-28 02:03:19 +01:00
Stein Magnus Jodal
cda2fbbe96
Add index() method to CurrentPlaylistController to reduce copying of the playlist
2011-12-28 01:55:02 +01:00
Stein Magnus Jodal
7b0954bef8
Simplify 'playlistinfo' implementation further, guided by new test asserts
2011-12-28 01:00:14 +01:00
Stein Magnus Jodal
6f6e2c7fd7
Let track{,s}_to_mpd_format() understand CpTrack objects
...
Thus the cpid and cpids kwargs can be removed, and lots of code doing
formatting of MPD responses can be simplified. This also reduces the
need for making full copies of the current playlist, which improves
performance.
2011-12-28 00:31:27 +01:00
Stein Magnus Jodal
aeee5518ac
Improved and simplified the 'playlistinfo' command handler
...
Cleaning up the rest of the code, it became obvious that sandos'
performance patch did not alter the semantics of 'playlistinfo'.
2011-12-27 23:57:14 +01:00
sandos
fab020f2d0
performance of playlistinfo <id> and status not dependent on playlist length
2011-12-12 22:22:03 +01:00
Stein Magnus Jodal
622a99ad3b
Change uri_handlers to uri_schemes on backends
2011-06-27 18:02:02 +03:00
Stein Magnus Jodal
3f97f3f78b
Convert cp_track from tuple to namedtuple, to get more readable code
2011-06-04 20:46:34 +02:00
Stein Magnus Jodal
e68d715d3e
Rename handle_pattern decorator to handle_request
2011-06-04 18:51:18 +02:00
Stein Magnus Jodal
76d0314eff
Replace 'frontend' with 'context' in MPD protocol impl
2011-06-03 16:08:53 +02:00
Stein Magnus Jodal
0d57a74cb3
Update MPD/current_playlist
2011-03-19 17:55:05 +01:00
Stein Magnus Jodal
6a78f11383
Remove mpd_format() from CurrentPlaylistController
2011-03-07 22:15:45 +01:00
Stein Magnus Jodal
8f30e9a139
Update protocol docs with change from previous commit
2010-08-24 23:16:13 +02:00
Stein Magnus Jodal
c89d58fccf
Fix 'add ' and 'addid '
2010-08-24 23:11:22 +02:00
Stein Magnus Jodal
10c1cab0c7
Reorganize mopidy.frontends.mpd
...
- Rename .frontend.MpdFrontend to .dispatcher.MpdDispatcher, as it
dispatches requests.
- Move exceptions into .exceptions.
- Move .server.MpdSession to .session.MpdSession.
- Move handle_pattern to .protocol.handle_pattern.
2010-08-19 23:51:46 +02:00
Stein Magnus Jodal
148612d842
Merge remote branch 'knutz3n/add_invalid_url_fix' into gstreamer
2010-08-16 22:38:08 +02:00
Johannes Knutsen
7674775718
Don't call lookup on backends with uris they don't support
2010-08-16 22:34:00 +02:00
Stein Magnus Jodal
d7bf31bab4
Rename CurrentPlaylistController.{load => append}
2010-08-16 21:34:06 +02:00
Stein Magnus Jodal
fb6b196646
Fix 'load' so one can append a playlist to the current playlist
2010-08-14 21:24:39 +02:00
Stein Magnus Jodal
5d9fd5b625
MPD: Update tests and fix 'playlistfind'
2010-08-14 14:42:44 +02:00
Johannes Knutsen
382caba05a
call playback.next if we try to delete current playing track
2010-08-13 19:56:25 +02:00
Stein Magnus Jodal
5393407571
MPD: Support 'plchanges' without quotes to work with BitMPC
2010-08-13 13:04:56 +02:00
Stein Magnus Jodal
255d70d1ae
MPD: Support 'plchanges "-1"' to work better with MPDroid
2010-08-13 12:20:51 +02:00
Stein Magnus Jodal
d0aac71cfb
MPD: Split protocol implementation into 11 modules
2010-08-10 02:08:59 +02:00