Commit Graph

195 Commits

Author SHA1 Message Date
Stein Magnus Jodal
b754885064 Fix all import order warnings 2014-05-07 20:08:43 +02:00
Stein Magnus Jodal
ed918fc7ff core: Fix shadowed import
Catched by new stricter flake8
2014-03-31 09:53:54 +02:00
Stein Magnus Jodal
5583ca5aba New flake8 version with new checks to conform to 2014-03-29 20:47:42 +01:00
Pierpaolo Frasa
b522491302 fix style issues 2014-01-26 02:50:03 +01:00
Pierpaolo Frasa
19858cedcd save the time position before calling stop 2014-01-26 02:14:11 +01:00
Stein Magnus Jodal
d447cbd798 core: Fix typo 2014-01-18 00:59:15 +01:00
Thomas Adamcik
52e66add97 review: Update browse docstring with respect to URI type 2014-01-18 00:16:53 +01:00
Thomas Adamcik
08b7d199f7 review: Typos and code formating 2014-01-17 23:52:18 +01:00
Thomas Adamcik
999f478010 core: Update browse to use uri isntead of path 2014-01-17 17:16:24 +01:00
Thomas Adamcik
826419d829 backend/core: Switch to root_directory instead of name 2014-01-16 22:53:18 +01:00
Stein Magnus Jodal
ead48f61cb Merge pull request #641 from jodal/feature/consistent-playback-events
Make core playback events consistent
2014-01-14 14:55:21 -08:00
Stein Magnus Jodal
1d108752f6 core: Make events emitted on playback consistent (fixes #629)
This commit does not try to make the events correct/perfect with regard to
GStreamer states, end-of-stream signalling, etc. It only tries to make the
events work consistently across all the methods on the playback controller.

* play(track) while already playing has changed from:

  - playback_state_changed(old_state='playing', new_state='playing')
  - track_playback_started(track=...)

  to:

  - playback_state_changed(old_state='playing', new_state='stopped')
  - track_playback_ended(track=..., time_position=...)
  - playback_state_changed(old_state='stopped', new_state='playing')
  - track_playback_started(track=...)

* next() has changed from:

  - track_playback_ended(track=..., time_position=...)
  - playback_state_changed(old_state='playing', new_state='stopped')
  - track_playback_ended(track=..., time_position=0)
  - playback_state_changed(old_state='stopped', new_state='playing')
  - track_playback_started(track=...)

  to same as play() above.

* previous() has changed in the same way as next().

* on_end_of_track() has changed from:

  - track_playback_ended(track=..., time_position=...)
  - playback_state_changed(old_state='playing', new_state='playing')
  - track_playback_started(track=...)

  to same as play() above.

* stop() has reordered its events from:

  - track_playback_ended(track=..., time_position=...)
  - playback_state_changed(old_state='playing', new_state='stopped')

  to:

  - playback_state_changed(old_state='playing', new_state='stopped')
  - track_playback_ended(track=..., time_position=...)
2014-01-14 01:18:39 +01:00
Thomas Adamcik
62ad6d1de2 core: Switch to neater handling of paths 2014-01-14 00:24:17 +01:00
Stein Magnus Jodal
05632c3b8b backend: Update backend API imports 2014-01-11 18:20:45 +01:00
Stein Magnus Jodal
7897fe7bac Fix typos 2014-01-10 00:04:39 +01:00
Stein Magnus Jodal
fe28311324 models: Use new Ref constructors 2014-01-09 08:54:33 +01:00
Stein Magnus Jodal
1fd1a38013 Merge branch 'develop' into feature/library-browse
Conflicts:
	mopidy/backends/local/json/library.py
	mopidy/core/actor.py
	tests/backends/local/library_test.py
2014-01-09 08:39:38 +01:00
Thomas Adamcik
042868e602 Merge branch 'develop' into feature/extension-registry
Conflicts:
	mopidy/backends/local/json/actor.py
	mopidy/backends/local/json/library.py
2014-01-08 23:50:03 +01:00
Stein Magnus Jodal
252f4792a0 core: Check if library is browsable at startup 2014-01-03 23:12:03 +01:00
Stein Magnus Jodal
69836d2e16 backend: Rename library.name to library.root_directory_name 2014-01-03 23:10:02 +01:00
Stein Magnus Jodal
af3b0e40fd models: Add Ref.type constants 2014-01-03 22:19:54 +01:00
Stein Magnus Jodal
048c3bb544 core: Use library name instead of URI scheme in browse() 2014-01-02 23:10:15 +01:00
Stein Magnus Jodal
6027ed1fac core: Add library.browse() 2014-01-02 22:06:33 +01:00
Stein Magnus Jodal
0fb7c79524 log: Use loggers named after __name__ 2014-01-01 13:31:20 +01:00
Thomas Adamcik
e82ce6256d core: Re-add one uri scheme per backend constraint. 2013-12-31 14:45:57 +01:00
Stein Magnus Jodal
3859448e06 core: Test version property, fix typo in changelog 2013-12-15 22:49:33 +01:00
Stein Magnus Jodal
77dd40b3d0 Merge remote-tracking branch 'kingosticks/feature/expose-version-to-api' into develop 2013-12-15 22:45:49 +01:00
Stein Magnus Jodal
b0b2e37950 docs: Include API docs for the Core class 2013-12-15 21:41:00 +01:00
kingosticks
9f93fbaa36 property for get_version and documented 2013-12-15 20:37:41 +00:00
kingosticks
e1bb03789b expose mopidy version to core API 2013-12-15 18:50:05 +00:00
Thomas Adamcik
04044d035f core: Refactor core Backends helper
Replaces the jungle of extra dicts/lists with an OrderedDict per backend
feature type. Also makes sure that each type/scheme is unique instead of
the scheme alone.
2013-11-27 00:04:51 +01:00
Thomas Adamcik
c128668621 listeners: Make listeners async
- Add a common Listener base class
- Make send helper for sending out events with pykka
- Make send async helper for avoiding blocking events

This change ensures all the events now get sent out via the MainThread instead
of blocking the actors.
2013-11-26 15:10:48 +01:00
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