Commit Graph

163 Commits

Author SHA1 Message Date
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 Cansino
71bae709ef core: filter() to accept also tuples 2013-11-07 11:05:33 +01:00
Javier Domingo Cansino
45a38cdaf1 core: Changing input to accept also sets, as might be also used. 2013-11-07 10:51:29 +01:00
Javier Domingo Cansino
6721a59b26 tests: Fixing self confusion mistake
docs: Documenting tracklist's new filter() feature
2013-11-07 09:46:34 +01:00
Javier Domingo Cansino
32b01f4e4a Adding a 'to list' conversion and correcting horrible mistake in comparison (put it reverse) 2013-11-05 13:17:55 +01:00
Javier Domingo Cansino
808770733f core: Letting filter() accept lists 2013-11-05 13:08:40 +01:00
Thomas Adamcik
bfddfab15a core: Fix typos pointed out in PR#542 2013-10-20 22:47:54 +02:00
Thomas Adamcik
84c373d7ea Merge branch 'develop' into fix/bug-496-handle-single
Conflicts:
	mopidy/core/tracklist.py
2013-10-20 22:46:35 +02:00
Thomas Adamcik
ba55181bc1 core: Reduce duplication between next and eot track handling. 2013-10-20 21:48:42 +02:00
Thomas Adamcik
f1f223bba8 local: Fix handling of single in eot_track (fixes #496)
- Adds test cases for code paths that caused bug
- Short circuits EOT next track handling when in single mode.
2013-10-20 21:43:19 +02:00
Thomas Adamcik
40754bb2e0 core: Fix handling of shuffle (fixes #453)
- Shuffle internal list when random is enabled
- Use presence of tl_track to determine if this is first run to trigger
  subsequent shuffles.
2013-10-20 19:28:13 +02:00
Stein Magnus Jodal
83db750e0a core.tracklist: Formatting 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
9864f55b75 core.tracklist: Improve if check in mark_unplayable() 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
46aeb3bfcc core.tracklist: Move logging into mark_unplayable() 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
67a7e0021a core.tracklist: Add docstrings to mark_* 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
91e718e85f core.tracklist: Rename mark_{starting => playing} 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
0ea4fd6af0 core.tracklist: Rename mark_{consumed => played} 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
aaa3b2e93c core.tracklist: Remove redundant if stmt in index() 2013-10-19 20:53:02 +02:00
Stein Magnus Jodal
9c2f6c2f25 core.tracklist: Tweak docstrings 2013-10-19 20:53:01 +02:00
Stein Magnus Jodal
ff89fc58a9 core.tracklist: Remove pylint comment 2013-10-19 20:53:01 +02:00
Stein Magnus Jodal
e5e1b5fa63 core.playback: Formatting 2013-10-19 20:41:48 +02:00
Stein Magnus Jodal
ce55e0eca5 core.playback: Refactor play() logic 2013-10-19 20:41:47 +02:00
Stein Magnus Jodal
d636f0d228 core.playback: Simplify if stmt
tracklist.tl_tracks is always a list
2013-10-19 20:41:47 +02:00
Stein Magnus Jodal
b6346f1c86 core.playback: Rename next_{ => tl_}track
To make the type of the variable obvious
2013-10-19 20:41:36 +02:00
Javier Domingo Cansino
a14a19447b Updating tidy-up-core to jodal specs and changing one name. Still need to update docs 2013-10-11 12:41:11 +02:00
Javier Domingo Cansino
686dd5981d Merging branch develop into tidy-up-core 2013-10-11 10:43:50 +02:00
Stein Magnus Jodal
863f7e0430 mpd: Trigger 'output' idle event on mute_changed()
This is required for e.g. ncmpcpp to detect that an enableoutput/disableoutput
command worked, making it possible to toggle the output back without restarting
ncmpcpp.
2013-10-09 23:52:59 +02:00
Stein Magnus Jodal
447864774e core: Add volume arg to volume_changed() event
It was already called with the argument, and both the MPD and HTTP frontends
handled it/expected it. It was just the default implementation in CoreListener
that lacked the argument.
2013-10-09 23:51:01 +02:00
Stein Magnus Jodal
6a3e322845 core: Tweak mute docs, add simple test case 2013-10-09 23:24:17 +02:00
Javier Domingo Cansino
390194afc3 Adding the possibility to mute at app level mopidy 2013-09-17 12:37:45 +02:00
Javier Domingo Cansino
157556a001 docs: Documenting further the TracklistController functions 2013-08-13 09:17:50 +02:00
Javier Domingo Cansino
7af86d65ac Merge branch 'develop' into tidy-up-core
Git was not correctly identifying the merge and threw a conflict
2013-08-12 13:41:15 +02:00
Javier Domingo Cansino
11d82056a9 core: Merged tracklist_position to index inside TracklistController
docs: Updated changelog.rst
2013-08-09 09:15:54 +02:00
Javier Domingo Cansino
fac2c8af7d format: Correcting flake8 messages 2013-08-09 08:32:01 +02:00
Stein Magnus Jodal
404fb00235 Remove pylint remnants 2013-08-08 21:12:42 +02:00
Stein Magnus Jodal
5c7a496dc2 Fix flake8 warnings 2013-08-08 21:09:01 +02:00
Javier Domingo Cansino
782a6a7d1f Renamed tl_track_at_* to more readable names 2013-08-08 17:01:24 +02:00
Javier Domingo Cansino
cb4130c2a7 core: Moving the trigger activation from one playback to tracklist 2013-08-08 13:45:36 +02:00
Javier Domingo Cansino
694db515e4 Merge branch 'develop' into tidy-up-core 2013-08-08 13:19:01 +02:00
Javier Domingo Cansino
2cb64b365d docs: Documenting changed and created functions 2013-08-08 13:13:52 +02:00
Javier Domingo Cansino
ab85dd9d62 Changed mark_consumed to a flexible mark() function that currently allows to mark songs as consumed (that have been played full time), played (that have been played for some time) and unplayable 2013-08-08 12:12:37 +02:00
Javier Domingo Cansino
2c83225a1e Created a TracklistController to let it control wether if a track must be consumed or not 2013-08-08 11:56:35 +02:00
Javier Domingo Cansino
6e61f2ef85 Refactoring code to convert tl_track_at_previous() in a function, also recoded
tests.
2013-08-07 21:53:46 +02:00
Javier Domingo Cansino
6abcad3e55 Converting tl_track_at_next into a function that takes the track argument.
Rewrote tests too.
2013-08-07 21:38:16 +02:00
Javier Domingo Cansino
ec716fba82 Converting tl_track_at_eot property in function with the track having to be
given as an argument
2013-08-07 19:44:00 +02:00
Javier Domingo Cansino
5a87d219ff Correcting some self-arounds that were innecesary. 2013-08-07 18:00:33 +02:00
Javier Domingo Cansino
68ea483c7b Converted tracklist_position() to be called with the track one wants to have information of,
/mopidy/frontends/mpd/protocol/status.py@189 should be checked for gathering a value before
the rest.
2013-08-07 17:50:22 +02:00
Javier Domingo Cansino
4db3999371 Cleanup of PlaybackController to be more specific on the current track and
moved those functions to TracklistController, which may control all related
to the tracks. Updated tests too.
2013-08-07 10:44:22 +02:00
Thomas Adamcik
18ed7c6279 local: Convert mopidy-local extension to local: uris.
- Use local:playlist:<name>, local:track:<path> and local:search uris
- Adds LocalPlaybackProvider which translates to file uris.
- Switches to storing actual uris in playlists - so local: urls and not
  file:// or plain paths.
- Moved file:// to streaming plugin
- Cleaned up tests and imports for these changes.
2013-07-30 00:40:12 +02:00
Stein Magnus Jodal
06c7d8ea46 Merge branch 'develop' into feature/limit-search-by-uri-root
Conflicts:
	docs/changes.rst
2013-03-31 12:45:31 +02:00