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.
This adds support for loading tag caches where the "file:" field has urlencoded
paths. For old tag caches without the urlencoding, this is a noop. Thus, old
tag caches continues to work.
This partly reverts "beac2e8 mpd: Use file:// URIs in tag_cache" by removing
the "file://" URI scheme and the music dir base path from the "file:" fields in
the tag cache.
The advantage is that the tag cache becomes independent of the music dir
location and the tag cache loader can be made compatible with both old and new
tag caches.
- path_to_uri() encodes unicode input as UTF-8 and leaves bytestring input
unchanged before it is converted to file:// URIs.
- uri_to_path() will now always return bytestrings, since we don't know if
there is any non-UTF-8 encoded chars in the file path, and converting it to
unicode would make such paths no longer match the dir or file it was
referring to.
- split_path() will now assume it gets a bytestring in.
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)