Commit Graph

78 Commits

Author SHA1 Message Date
Stein Magnus Jodal
8b543bad44 local: URIs should be unicode
Any non-ASCII content is uriencoded anyway.
2016-01-31 21:07:17 +01:00
Thomas Adamcik
3a57a5792b core: Make sure we always emit state_changed between tracks
Gapless broke this, so this change makes sure that next/prev/play and gapless
track changes all correctly emit events.

Note that this only ensures we get PLAYING -> PLAYING events. Not the old
STOPPED -> PLAYING and then PLAYING -> STOPPED.
2015-11-21 22:43:40 +01:00
Thomas Adamcik
e767cb3f41 tests: Convert local tracklist test to use core actor proxy. 2015-11-21 22:31:25 +01:00
Stein Magnus Jodal
b29d5df9b8 compat: Avoid non-ASCII in byte literals 2015-10-29 22:57:06 +01:00
Thomas Adamcik
d6cfe0d1ae tests: Update local playback tests to synchronize core state 2015-09-16 23:41:16 +02:00
Thomas Adamcik
592b728e32 core: Refactor previous() to use pending_track for state changes 2015-09-04 17:16:39 +02:00
Thomas Adamcik
2cd9903a54 core: Refactor next() to use pending_track for state changes 2015-09-04 16:08:54 +02:00
Thomas Adamcik
d8ce171b9a Merge branch 'develop' into feature/implement-gapless
Conflicts:
	tests/local/test_playback.py
2015-09-04 14:15:32 +02:00
Thomas Adamcik
0aeafa714b local: Update playback test to use core as a running actor 2015-09-04 11:41:10 +02:00
Thomas Adamcik
e12ea662da Merge branch 'develop' into feature/implement-gapless 2015-09-02 21:03:17 +02:00
Stein Magnus Jodal
e0a028291a local: Replace local/data_dir with core/data_dir
Partly fixes #1259
2015-08-23 00:37:38 +02:00
Thomas Adamcik
3fe9f7b3a7 Merge branch 'develop' into feature/implement-gapless
Conflicts:
	mopidy/commands.py
	mopidy/core/playback.py
	tests/core/test_playback.py
	tests/local/test_playback.py
2015-07-22 20:00:46 +02:00
Ronald Zielaznicki
82ed660777 Add core config values to relevent test cases. 2015-07-19 23:05:39 -04:00
Stein Magnus Jodal
c59784c1e8 local: Add path_to_file_uri() 2015-05-08 00:55:03 +02:00
Stein Magnus Jodal
56cffa0089 local: Test path_to_local_{directory,track}() 2015-05-08 00:55:03 +02:00
Stein Magnus Jodal
4d5b485760 local: Add local_uri_to_file_uri()
Which replaces local_track_uri_to_file_uri() and also handles
local:directory: URIs.
2015-05-08 00:55:03 +02:00
Stein Magnus Jodal
d8bcd7f273 Rename mopidy.utils to mopidy.internal 2015-05-07 23:15:56 +02:00
Thomas Adamcik
6a7005be1e core: Add tlid argument to index calls.
Should save clients from having to pass tl_track models around.
2015-04-19 00:22:52 +02:00
Thomas Adamcik
81fd426caf tests: Update tests to not used deprecated kwargs 2015-04-17 00:00:58 +02:00
Thomas Adamcik
324bec1f4a core: Validate core API calls 2015-04-14 23:45:56 +02:00
Thomas Adamcik
94628b5f82 local: Don't use tuple form of TlTracks in tests 2015-04-13 00:50:33 +02:00
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
Thomas Adamcik
8f96bf0f39 tests: Fix some model use oddities 2015-04-05 13:08:15 +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