Commit Graph

56 Commits

Author SHA1 Message Date
Thomas Adamcik
11c9aa4ad0 Merge branch 'develop' into feature/implement-gapless
Conflicts:
	mopidy/backend.py
	mopidy/commands.py
	mopidy/core/actor.py
	mopidy/core/playback.py
	tests/audio/test_actor.py
	tests/core/test_playback.py
	tests/local/test_playback.py
2015-04-05 19:24:56 +02:00
Stein Magnus Jodal
c4940cbea2 autopep8: Add space after class signature/docstring 2015-04-03 00:05:26 +02:00
Thomas Adamcik
9ede14f4a1 tests: Convert to using deprecation helpers across the board. 2015-03-30 23:50:54 +02:00
Thomas Adamcik
dc673d554c tests: Ignore deprecated tracklist.add(tracks=...) in local tests
Note, this is mostly because these tests are just core tests in disguise and
need a lot more love than I can give them right now.
2015-03-29 23:11:00 +02:00
Thomas Adamcik
49fc9941a1 core: Mark searching via keyword argument based query deprecated 2015-03-29 23:11:00 +02:00
Thomas Adamcik
0ab52a73fa core: Mark library.lookup by uri deprecated
Updates core, mpd and tests to not use deprecated calls or safely catch them
when running with -W error.
2015-03-29 23:11:00 +02:00
Thomas Adamcik
5a3fb64250 core: Emit deprecation warning for library.find_exact 2015-03-29 23:08:03 +02:00
Thomas Adamcik
07f0453c6e core: Make event triggers internal 2015-03-23 00:50:05 +01:00
Stein Magnus Jodal
56dca0e931 Merge pull request #1064 from adamcik/fix/1052-break-backend-play
backend: Change playback API (breaking change!)
2015-03-22 09:19:39 +01:00
Stein Magnus Jodal
b2f60bc338 m3u: Extract new M3U backend from local
Fixes #1054
2015-03-21 08:13:45 +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
Thomas Adamcik
65f87e89f1 core: Update pending track handling and fix consume / gapless issue
- Pending track should only be triggered by stream_changed if there is one.
- Tracklist changed was incorrectly calling stop breaking tests and gapless
- Tests have been updated to capture and replay audio events. This should avoid
  test deadlocks while still using the audio fakes.
2015-03-16 23:50:08 +01:00
Stein Magnus Jodal
336ef4534a tests: Use assertEqual instead of assertEquals 2015-03-14 23:01:49 +01:00
Thomas Kemmer
29b4a2075a local: Fix get_images() for local libraries returning single track from lookup(). 2015-03-14 16:12:46 +01:00
Thomas Kemmer
e655d39384 Fix #1031: Add get_images() to local library. 2015-03-12 11:43:27 +01:00
Thomas Adamcik
29b00cabf9 Merge pull request #1028 from tkem/fix/1026
Fix #1026: Sort local playlists by name.
2015-03-08 23:53:04 +01:00
Thomas Kemmer
94c418d5e6 Fix #1026: Sort local playlists by name. 2015-03-07 22:42:22 +01:00
Thomas Kemmer
9150c34053 Fix #1023: Remove support for local album images from coverartarchive.org 2015-03-06 10:02:08 +01:00
Thomas Adamcik
319c1fc1e3 local: Readd support for search without limit for get_distinct support 2015-03-02 23:39:06 +01:00
Thomas Adamcik
7c2c4c1c45 Merge branch 'fix/local-json-limit-offset' of https://github.com/ali/mopidy into develop 2015-03-02 23:18:39 +01:00
Lasse Bigum
fbd534efbf Don't change to playing state when seeking in paused state
Do not switch state from paused to playing when seeking
2015-03-01 15:50:17 +01:00
Thomas Adamcik
0829f34a90 Merge pull request #999 from tkem/fix/998
Fix #998: Remove event already sent by PlaylistsController.
2015-02-25 21:05:53 +01:00
Thomas Kemmer
dd54fdb086 Fix #937: Local playlists refactoring. 2015-02-25 18:50:29 +01:00
Thomas Kemmer
96a3cb6ef5 Remove obsolete unit test. 2015-02-25 17:48:41 +01:00
Ali Ukani
ead147f482 Fix flake8 errors, prepare for Python 3 port
Fixes flake8 warnings
Reword docstring for find_exact
Use range instead of xrange in preparation for porting to Python 3
2015-02-16 02:24:40 -05:00
Ali Ukani
fc21d466f0 local: use limit and offset when searching json library
Fixes the json local library's search behavior. Uses limit and offset
arguments when returning search results.
2015-02-16 02:24:40 -05:00
Stein Magnus Jodal
5270aa65e2 audio: Move DummyAudio into tests package 2015-02-13 10:40:21 +01:00
Thomas Adamcik
b0aebaf993 core: Make sure current_tl_track changes on stream change
- Adds stream changed handler to core
- Moves playback started trigger to stream changed
- Made about to finish store next track in _pending_tl_track
- Set the pending track as current in stream changed
- Adds tests for all of this and fixes existing tests
2015-01-23 00:14:30 +01:00
Thomas Adamcik
49f16704d8 core: Remove on_end_of_track from playback
This has been replaced by on_about_to_finish and on_end_of_stream.
Tests have been updated to reflect these changes.
2015-01-22 23:16:51 +01:00
Thomas Adamcik
9fc319055c 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.
2015-01-21 22:13:41 +01:00
Ali Ukani
dac5f9e406 Add test for exact search with album query 2015-01-05 23:24:52 -05:00
Thomas Adamcik
fa8547c397 tests: Add noqa markers for setUp/tearDown 2014-12-30 00:23:01 +01:00
Thomas Adamcik
656f7e976f Merge branch 'develop' into feature/taglist-converter
Conflicts:
	docs/changelog.rst
2014-12-25 22:46:44 +01:00
Stein Magnus Jodal
dbbb86e6c0 Merge branch 'release/v0.19.x' into develop
Conflicts:
	mopidy/core/playback.py
2014-12-24 00:24:19 +01:00
Stein Magnus Jodal
c6ff9eee86 playback: Remove skipped track on next in consume mode
Also adds core level tests of consume behavior on next/prev/eot.

Fixes #902
2014-12-24 00:04:41 +01:00
Thomas Adamcik
dcaa0f6732 local: Move musicbrainz cover art helper to translator 2014-12-18 23:28:14 +01:00
Thomas Adamcik
90fdd46109 local: Cleanup translator tests 2014-12-14 23:14:11 +01:00
Stein Magnus Jodal
496142c201 py3: Use absolute imports by default 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
7856c14b26 tests: Use with stmt for assertRaises 2014-09-25 23:03:35 +02:00
Thomas Kemmer
806174916d Change JsonLibrary.lookup to return a list 2014-09-05 05:35:18 +02:00
Thomas Kemmer
f90671fe96 Fixed flake8: I201 Missing newline between sections or imports 2014-08-30 14:10:39 +02:00
Thomas Kemmer
380223bb96 local: Return multiple tracks from lookup() 2014-08-30 14:02:43 +02:00
Stein Magnus Jodal
6d6bc4b808 core: Use new mixer API 2014-07-08 01:11:25 +02:00
Stein Magnus Jodal
b754885064 Fix all import order warnings 2014-05-07 20:08:43 +02:00
Stein Magnus Jodal
061ff00a39 tests: Don't depend on the order of random sequences 2014-02-28 01:17:53 +01:00
Thomas Adamcik
3c0cc1564c local: Make browse test check ordering again 2014-01-20 23:22:15 +01:00
Thomas Adamcik
9ba168e9b9 local: Update browse cache code to add all directories
Tests have been updated to make sure multiple folders are added. We had
forgotten to add child folders to the ones that had already been created.
2014-01-19 22:21:02 +01:00
Thomas Adamcik
e97e620635 local: Rename json test to new naming scheme 2014-01-18 01:35:33 +01:00
Stein Magnus Jodal
da71d7fb14 Merge pull request #647 from adamcik/feature/browse-by-uri
Convert browse API to be fully URI based.
2014-01-17 15:58:39 -08:00
Stein Magnus Jodal
06856851f7 local: Make search filters more robust (fixes #635) 2014-01-17 23:43:43 +01:00