Commit Graph

14 Commits

Author SHA1 Message Date
Thomas Adamcik
7201f2cb10 tests: Make dummy backend use real playback provider if audio is passed in
This is needed in order to make audio events propagate, to core and trigger
async state changes in tests.
2015-09-04 15:34:40 +02:00
Stein Magnus Jodal
c4940cbea2 autopep8: Add space after class signature/docstring 2015-04-03 00:05:26 +02:00
Stein Magnus Jodal
2c11344434 dummy: Make it obvious that method is test-only 2015-03-25 13:16:27 +01:00
Stein Magnus Jodal
36fba3d67d flake8: Fix unussed import 2015-03-25 09:48:24 +01:00
Stein Magnus Jodal
d768a3b4f7 Merge pull request #1082 from adamcik/feature/only-support-new-style-search-in-backends
core/backend: Stop supporting old search signatures
2015-03-25 00:09:06 +01:00
Stein Magnus Jodal
f2a56edbf0 dummy: Replace playlists property with test-only helper 2015-03-25 00:03:56 +01:00
Thomas Adamcik
ead725e995 core/backend: Stop supporting old search signatures
All backends are expected to support the exact argument. A friendly log message
will be printed to prompt users to upgrade backends that fail due to this.
2015-03-24 23:54:49 +01:00
Stein Magnus Jodal
23e2295c46 dummy: Fix playlists.get_items() bug 2015-03-24 01:54:07 +01:00
Stein Magnus Jodal
55b1eb7383 backend: Add playlists.as_list() and playlists.get_items(uri) 2015-03-23 00:44:39 +01:00
Thomas Adamcik
bbf52eede9 backend: Change playback API (breaking change!)
While trying to remove traces of stop calls in core to get gapless working I
found we had no way to switch to switch tracks without triggering a play. This
change fixes this by changing the backends playback provider API.

- play() now _only_ starts playback and does not take any arguments.
- prepare_change() has been added, this could have been avoided with a kwarg to
  change_track(track), but that would break more backends.
- core has been updated to call prepare_change+change_track+play as needed.
- tests have been updated to handle this change.

Longer term I hope to completely rework the playback API in backends, as 99% of
our backends only use change_track(track) to translate URIs. So we should make
simple case simple, and handle mopidy-spotify / appsrc in some other way.

Cherry picked from the WIP gapless branch.
2015-03-21 00:05:00 +01:00
Stein Magnus Jodal
65c5242b14 backend: Remove default impl of PlaylistProvider.playlists
The default was insane. For one, because overriding e.g. just the
getter would make the property have a pair of working getter and
setter that are entirely disconnected.
2015-03-18 00:25:26 +01:00
Thomas Adamcik
8cc9c9bbc0 core: Rename list_distinct to get_distinct 2015-03-02 22:41:09 +01:00
Thomas Adamcik
5fd2afa7ca mpd: Switch list command to using list_distinct 2015-03-02 00:26:51 +01:00
Stein Magnus Jodal
df95a988b7 backend: Move DummyBackend into tests package 2015-02-13 01:37:07 +01:00