With this change we ask the core.playback system to set the next tracks uri and
otherwise update state as needed. With this change we should be able to support
streaming oggs and gapless playback to mention a few of items this fixes.
On the down side, this change breaks test_end_of_track_skips_to_next_track_on_failure
as there is no clean way to handle this with the async nature of this EOT
handling.
Checking the URI inside the new-source handler turned out to tickle some issue
that gave us deadlocks. Getting the source and checking which factory created
it is much safer.
This method is intended to make implementing EOT handling much more streamlined
by adding a way to easily just change the URI and any other state without
messing with gstreamer pipe states
Naming of this is a bit unfortunate as it is not the same as the
core.playback's concept of change_track. At least not yet
This commit tries to detangle EOS from EOT which we have incorrectly
intermingled. EOS events should only be happening at the end of the playlist
when we are about to stop. EOT handling has been removed / broken in this
change, and will need to be re-added with proper tests.
file:// URIs are uriencoded, and will thus conserve the encoding of the file
paths. We cannot just convert file paths in other encodings to UTF-8, because
then we won't find the files we point to.
Pyspotify now creates the session in
`pyspotify.SpotifySessionManager.__init__` (rather than in `.connect`) -
see [here][1]. Therefore it seems best not to set `self.session = None`
in `mopidy.SpotifySessionManager.__init__` or `self.session = session`
in `logged_in`.
[1]: 483f757430 (L1R39)
The `on_event()` method is called on all events. By default, it forwards the
event to the specific event handler methods. It's also a convenient method to
override if you want to handle all events in one place.