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=...)
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.
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.
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.
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.