Commit Graph

1192 Commits

Author SHA1 Message Date
Stein Magnus Jodal
8f1b98b306 core: Don't fail when adding tracks after end of tracklist 2012-11-20 22:36:39 +01:00
Stein Magnus Jodal
ae9a257091 Make tracklist.add() only take and return lists 2012-11-20 22:12:09 +01:00
Stein Magnus Jodal
1ed56c9ed7 Use tracklist.add() instead of tracklist.append() 2012-11-20 21:55:51 +01:00
Stein Magnus Jodal
d107b13fcb core: Remove playback.current_tlid 2012-11-20 21:48:19 +01:00
Stein Magnus Jodal
2f27167677 core: Remove playback.track_at_previous 2012-11-20 21:48:03 +01:00
Stein Magnus Jodal
70d4dba7aa core: Remove playback.track_at_next 2012-11-20 21:47:44 +01:00
Stein Magnus Jodal
ee8c2ca589 tests: Rename populate_playlist() to populate_tracklist() 2012-11-20 09:24:37 +01:00
Stein Magnus Jodal
bec91284be mpd: Allow bad 'find' requests 2012-11-20 00:38:53 +01:00
Stein Magnus Jodal
7da2058b65 mpd: Test response for bad 'list' requests 2012-11-20 00:31:41 +01:00
Stein Magnus Jodal
56c4892f46 Merge branch 'develop' into feature/http-frontend 2012-11-20 00:27:19 +01:00
Stein Magnus Jodal
f82d3fca39 Merge branch 'feature/model-serialization' into develop 2012-11-20 00:21:34 +01:00
Stein Magnus Jodal
8c6f04a408 models: Change serialized type marker from '__type__' to '__model__' 2012-11-20 00:21:26 +01:00
Stein Magnus Jodal
693a3d3ec6 models: Model creation with kwarg matching method name should fail 2012-11-19 23:58:16 +01:00
Stein Magnus Jodal
34d444e563 models: Don't allow model deserialization to override methods 2012-11-19 23:35:05 +01:00
Stein Magnus Jodal
eab399357f Make library.lookup() return a list of tracks 2012-11-19 21:09:10 +01:00
Stein Magnus Jodal
32639ea8de Replace {tracklist,playlists}.get() with .filter() which always returns a list 2012-11-19 21:09:10 +01:00
Stein Magnus Jodal
3bd9d2096f tests: Formatting 2012-11-19 21:09:10 +01:00
Stein Magnus Jodal
7df556c9b3 Return lists of tracks from search() and find_exact() 2012-11-19 18:13:14 +01:00
Stein Magnus Jodal
6f0919bda8 style: Fix flake8 warnings 2012-11-19 18:01:31 +01:00
Stein Magnus Jodal
968de84b93 http: Broadcast all events over the WebSocket 2012-11-18 19:02:36 +01:00
Stein Magnus Jodal
62530be8b4 Merge branch 'feature/model-serialization' into feature/http-frontend 2012-11-18 17:31:13 +01:00
Stein Magnus Jodal
3bc4126b45 models: Fix TlTrack deserialization 2012-11-18 17:28:37 +01:00
Stein Magnus Jodal
68e4b207cb models: Support automatic serialization to and deserialization from JSON 2012-11-18 16:53:26 +01:00
Stein Magnus Jodal
f237736f87 models: Add '__type__' attribute to serialized models 2012-11-18 16:53:09 +01:00
Stein Magnus Jodal
74a6589668 tests: Fix typo in class name 2012-11-18 16:51:33 +01:00
Stein Magnus Jodal
7e3fba0155 Merge branch 'develop' into feature/http-frontend 2012-11-18 09:45:44 +01:00
Stein Magnus Jodal
59919b279c Merge pull request #244 from jodal/feature/mpris-playlists
mpris: Implement the playlists interface (fixes #229)
2012-11-17 13:37:06 -08:00
Stein Magnus Jodal
15cb291316 tests: Rename test file so that it's executed 2012-11-17 17:10:27 +01:00
Stein Magnus Jodal
5efce8ac76 local: Trigger playlists_loaded() event on playlist load/refresh 2012-11-17 17:09:27 +01:00
Stein Magnus Jodal
b8c7703c79 mpris: Implement the playlists interface (fixes #229) 2012-11-17 01:45:24 +01:00
Stein Magnus Jodal
330731a247 core: Forward playlists_loaded() event from backends to frontends 2012-11-17 01:22:25 +01:00
Stein Magnus Jodal
0f6c9a1673 backends: Add BackendListener interface with playlists_loaded() event 2012-11-17 01:22:25 +01:00
Stein Magnus Jodal
426d5aea16 core: Trigger playlists_loaded() after playlist refresh 2012-11-17 00:42:03 +01:00
Stein Magnus Jodal
5526ee5a95 core: Add CoreListener.playlists_loaded() event 2012-11-17 00:42:03 +01:00
Stein Magnus Jodal
4efff4a5a3 core: Trigger playlist_changed() event on create() and save() 2012-11-16 23:50:30 +01:00
Stein Magnus Jodal
fd86b7173c core: Add playlist to playlist_changed() event 2012-11-16 23:50:01 +01:00
Stein Magnus Jodal
df4d7cd4c9 http: Update to use unicode literals and not cause warnings with flake8 2012-11-16 22:34:36 +01:00
Stein Magnus Jodal
87ba412942 models: Make TlTrack an ImmutableObject 2012-11-16 15:01:37 +01:00
Stein Magnus Jodal
cfac728def tests: Don't use indexes into TlTracks 2012-11-16 14:57:25 +01:00
Stein Magnus Jodal
0e7f867d67 core: Test tracklist event trigging 2012-11-16 13:54:55 +01:00
Stein Magnus Jodal
d378fd7160 tests: Move events tests from tests/backends/ to tests/core 2012-11-16 11:53:48 +01:00
Stein Magnus Jodal
476df7a14d core: Add tracklist_changed() event 2012-11-16 11:43:49 +01:00
Stein Magnus Jodal
fff70c46a6 core: Make tracklist.append() return the appended TlTracks 2012-11-16 10:26:45 +01:00
Stein Magnus Jodal
684586dd18 mpris: Update for MPRIS 2.2 compliance 2012-11-15 09:04:21 +01:00
Thomas Adamcik
4d4c560882 Merge pull request #240 from jodal/feature/audio-state-events
Audio state events
2012-11-14 15:00:09 -08:00
Stein Magnus Jodal
e1ef73f517 Merge branch 'develop' into feature/http-frontend 2012-11-14 09:35:19 +01:00
Stein Magnus Jodal
3a24deaec3 Rename 'stored playlists' to 'playlists' 2012-11-14 09:23:19 +01:00
Stein Magnus Jodal
87ce7bbe11 audio: Maintain state and trigger events based on GStreamer state changes 2012-11-14 01:49:17 +01:00
Stein Magnus Jodal
76b1fa8e1b audio: Add state_changed(old_state, new_state) event 2012-11-13 20:31:38 +01:00
Stein Magnus Jodal
42fdaf3ff0 audio: Move tests to make room for more audio tests 2012-11-13 20:26:05 +01:00
Stein Magnus Jodal
dc356a81fd Merge branch 'feature/rename-cp-to-tracklist' into develop
Conflicts:
	docs/changes.rst
	mopidy/frontends/mpd/protocol/current_playlist.py
2012-11-13 19:09:18 +01:00
Stein Magnus Jodal
cc39853638 mpd: Normalize file/filename filters to uri filters 2012-11-13 11:53:47 +01:00
Stein Magnus Jodal
4f0a708411 mpd: Allow 'file' key to 'search' and 'find' 2012-11-13 11:34:48 +01:00
Stein Magnus Jodal
bba9548b27 Rename 'current playlist' to 'tracklist' 2012-11-13 10:59:48 +01:00
Stein Magnus Jodal
344d5bd49d Merge pull request #238 from jodal/feature/optional-backend-providers
Make all three backend provider types optional
2012-11-13 01:41:18 -08:00
Stein Magnus Jodal
1b5b7abfdd Allow settings prefixed with 'CUSTOM_' (fixes #204) 2012-11-13 00:44:07 +01:00
Stein Magnus Jodal
6acaa490e9 Make all strings unicode by default (fixes #224) 2012-11-13 00:18:47 +01:00
Stein Magnus Jodal
92bd599ecf Update stored playlists controller to support backends without playlists 2012-11-12 22:38:49 +01:00
Stein Magnus Jodal
d748c07daf Update playback controller to support backends without playback support 2012-11-12 22:19:27 +01:00
Stein Magnus Jodal
6f32d72792 Update the library controller to support backends without a library 2012-11-12 21:41:48 +01:00
Stein Magnus Jodal
86e0eff21d http: Extend player resource, add tracklist and playlists resources 2012-11-10 20:57:18 +01:00
Stein Magnus Jodal
49cf1ab8aa Require at least one frontend and one backend 2012-11-08 14:43:21 +01:00
Stein Magnus Jodal
197447c0cb Remove ancient despotify settings check 2012-11-08 14:42:06 +01:00
Stein Magnus Jodal
f08fba954e Update to work with current develop 2012-11-03 22:03:26 +01:00
Stein Magnus Jodal
938524e67e Merge branch 'develop' into feature/stored-playlists-cleanup 2012-11-03 22:02:19 +01:00
Stein Magnus Jodal
d985b8be38 Fix plchanges so it returns nothing when nothing has changed 2012-11-01 23:28:19 +01:00
Stein Magnus Jodal
60112897d2 MPD: Support listplaylist{,info} without quotes around spaceless playlist name (fixes #218) 2012-11-01 22:29:11 +01:00
Stein Magnus Jodal
8c9a3d6df2 Slugify local playlist names to make them safe to use in paths (#217) 2012-11-01 12:46:29 +01:00
Fred Hatfull
a5b454acc0 Fixes support for MPD find/search by filename
Extends `find_exact` and `search` in mopidy.backends.local.library
to support the `filename` query field. This field can get passed in
from the MPD frontend and would break with a `LookupError` when used.
This patch fixes the issue and introduces two new tests to cover the
added functionality.
2012-10-31 23:45:13 -07:00
Stein Magnus Jodal
6c49a7fc52 Make core.stored_playlists.save() support multibackend (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
3d05f3c65f Change stored_playlists.delete() to accepting an URI (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
f9f6f9394d Remove stored_playlists.rename() (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
06bcad2db9 Make local.stored_playlists.save() capable of renaming playlists (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
51aab4f138 Make local stored playlists set and use URIs (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
d8378e9284 Set URI on local playlists when reading from disk (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
fd88b974e8 Make core.stored_playlists.refresh() support multibackend (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
8cc1896b9d Make core.stored_playlists.lookup() support multibackend (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
e2474da1ef Make core.stored_playlists.create() support multibackend (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
0ddbb4e28a Make core.stored_playlists.playlists read-only (#217) 2012-10-31 16:59:28 +01:00
Stein Magnus Jodal
a679a47212 Minor test updates 2012-10-31 15:27:04 +01:00
Stein Magnus Jodal
ae344e937b Merge branch 'master' into develop
Conflicts:
	docs/changes.rst
	mopidy/__init__.py
	mopidy/audio/__init__.py
	mopidy/backends/dummy.py
	mopidy/backends/local/__init__.py
	mopidy/backends/spotify/__init__.py
	mopidy/utils/__init__.py
	mopidy/utils/network.py
	tests/version_test.py
2012-10-30 18:13:28 +01:00
Stein Magnus Jodal
5d5f0cc6e3 Bump version number to v0.8.1 2012-10-30 17:57:25 +01:00
Stein Magnus Jodal
f1e2cff3e0 Update to work with Pykka 1.0 2012-10-30 16:28:20 +01:00
Stein Magnus Jodal
d60bb57f5f Test new Album.date attribute 2012-10-30 10:18:40 +01:00
Stein Magnus Jodal
1014c6e373 Include both involved backends in the error message 2012-10-29 10:50:18 +01:00
Stein Magnus Jodal
4a79b559d5 Fail if two backends claims to handle the same URI schema 2012-10-29 10:31:35 +01:00
Stein Magnus Jodal
9a617b1803 Improvements after code review 2012-10-28 20:58:51 +01:00
Stein Magnus Jodal
0641d2d207 Make core.stored_playlists.playlists support multiple backends 2012-10-28 11:10:40 +01:00
Stein Magnus Jodal
a35deec050 Make core.library support multiple backends 2012-10-28 11:10:39 +01:00
Stein Magnus Jodal
c47cec9e65 Make core.playback select backend based on track URI 2012-10-28 11:10:39 +01:00
Stein Magnus Jodal
7b9c682e95 Make core.uri_schemes include URI schemes from all backends 2012-10-28 11:10:39 +01:00
Stein Magnus Jodal
2d92a7a228 Start multiple backends 2012-10-27 14:55:09 +02:00
Stein Magnus Jodal
956655f742 Update tests to use tracks with valid URIs 2012-10-27 14:53:35 +02:00
Stein Magnus Jodal
d685fe554c Simplify pykka imports 2012-10-26 22:57:41 +02:00
Stein Magnus Jodal
587dde287f Update to work with Pykka 1.0 2012-10-26 22:32:06 +02:00
Stein Magnus Jodal
c915c197dd Formatting 2012-10-25 22:49:47 +02:00
Stein Magnus Jodal
8683537816 Don't use command_list as both bool and list (#211) 2012-10-17 01:43:22 +02:00
Stein Magnus Jodal
afdc665ac0 Use deps.{platform_info,python_info} in log 2012-10-16 22:26:28 +02:00
Stein Magnus Jodal
5a0529b142 Empty utils/__init__.py 2012-10-16 21:36:51 +02:00
Stein Magnus Jodal
d4f5d02c72 Move MpdSession to a session module 2012-10-16 16:13:23 +02:00
Stein Magnus Jodal
d9d6a3d5b6 Move exceptions to mopidy.exceptions 2012-10-16 16:08:46 +02:00
Stein Magnus Jodal
ac60bcdf8e Fix all flake8 warnings in tests (#211) 2012-10-16 14:43:31 +02:00
Stein Magnus Jodal
c115cf123f MPD: Use core actor passed to frontend 2012-09-28 00:48:28 +02:00
Stein Magnus Jodal
9fd3e93cb6 MPRIS: Use core actor passed to frontend 2012-09-28 00:48:28 +02:00
Stein Magnus Jodal
706b6c6d3f Pass core actor to frontends 2012-09-28 00:48:24 +02:00
Stein Magnus Jodal
63cd153b1b Let NetworkServer pass protocol_kwargs on 2012-09-28 00:48:23 +02:00
Stein Magnus Jodal
e7f08a7a20 Rename mopidy.{listeners.BackendListener => core.CoreListener} 2012-09-27 20:35:39 +02:00
Stein Magnus Jodal
2fdeec9f5a Move controllers to a new core actor
The frontends use the new core actor, while the core actor uses the backend.

This is a step towards supporting multiple backends, where the core actor will
coordinate the backends.
2012-09-27 20:35:39 +02:00
Stein Magnus Jodal
5265609610 MPRIS: New BackendListener.seeked() signature 2012-09-26 22:12:38 +02:00
Stein Magnus Jodal
66f476e85a Fix typo 2012-09-26 10:08:59 +02:00
Stein Magnus Jodal
81fca7d686 Switch to time position from provider 2012-09-25 11:18:27 +02:00
Stein Magnus Jodal
12d6ce53dd Send new time position to 'seeked' listeners 2012-09-25 11:18:27 +02:00
Stein Magnus Jodal
28e5ed8b2e Send old and new state to playback_state_changed listeners 2012-09-25 11:18:26 +02:00
Stein Magnus Jodal
b3f3cfe2a0 Use assert{Less,Greater}[EEqual] in tests 2012-09-25 11:18:26 +02:00
Stein Magnus Jodal
7d4b605ee5 Update version number to 0.8.0 2012-09-20 01:01:38 +02:00
Stein Magnus Jodal
6451519d2a MPD: Support 'playid 0' without quotes around id 2012-09-20 00:28:30 +02:00
Stein Magnus Jodal
52c7726de2 MPD command 'close' does not return 'OK'
Test broke when Pykka actors started processing the actor inbox before
stopping themselves.
2012-09-19 01:50:48 +02:00
Thomas Adamcik
5a47dfe159 Update import style in tests.utils.path 2012-09-16 22:44:15 +02:00
Thomas Adamcik
a707daf458 Add tests for expand_path and fix ordering.
Expansions need to happen before abspath is called or else result is wrong.
2012-09-16 22:26:44 +02:00
Thomas Adamcik
6cc57701f9 Update parse_m3u to allow caller to decide what location playlist is relative to. 2012-09-16 19:28:15 +02:00
Thomas Adamcik
7ceb530064 Updated find files to ignore hidden files and folders. 2012-09-16 18:14:11 +02:00
Stein Magnus Jodal
a8d1d41ab3 Use assertIn and assertNotIn in tests 2012-09-15 17:46:25 +02:00
Stein Magnus Jodal
2ba05f9405 Add PlaybackState enum 2012-09-14 01:17:55 +02:00
Stein Magnus Jodal
aab37302a1 Rename mopidy.gstreamer to mopidy.audio 2012-09-14 01:05:42 +02:00
Stein Magnus Jodal
0559213da3 Move backend controllers to mopidy.core 2012-09-13 23:41:20 +02:00
Stein Magnus Jodal
7525cad94c Let Track.date be an ISO-8601 string
This lets us have less precision than full dates. E.g. Spotify tracks only got
release year, not full release date.

The original MPD server regularly expose data like this as "Date: 1977", so we
don't need to fake more precision for MPD's sake.
2012-09-12 23:06:06 +02:00
Stein Magnus Jodal
dbf7030d5b Fix crash in local backend when looking up unknown path 2012-09-11 23:23:36 +02:00
Stein Magnus Jodal
4bffea8b1f Test the GStreamer class as an actor
The test should use the same interface and code paths as production code.
2012-09-10 00:34:12 +02:00
Thomas Adamcik
db3a201795 Fix tests and update docs with #150 fix. 2012-09-09 22:09:23 +02:00
Stein Magnus Jodal
e948a51310 Remove duplicate tearDown() 2012-09-08 23:05:31 +02:00
Stein Magnus Jodal
e3ba389996 Make MPRIS frontend handle unknown volume 2012-09-08 01:24:48 +02:00
Stein Magnus Jodal
21a85c0898 Merge pull request #178 from adamcik/feature/serialize
Imutable object serialization support
2012-09-05 16:57:24 -07:00
Thomas Adamcik
59dc48e982 Merge branch 'develop' into feature/serialize 2012-09-06 00:03:33 +02:00
Thomas Adamcik
6805c16b1a Add .serialize() method to ImutableObjects.
Should be useful for things like dumping to json.
2012-09-05 23:54:37 +02:00
Thomas Adamcik
b0d6dc3e0c Remove injected gstreamer settings. 2012-09-05 22:42:09 +02:00
Thomas Adamcik
1255b87877 Try running with fakesink for gstreamer test. 2012-09-05 01:26:05 +02:00
Thomas Adamcik
c71202c2be Remove all of mopidy.mixers and tests.mixers modules. 2012-09-04 00:54:28 +02:00
Thomas Adamcik
4ffd06736e Update MPD frontend to use playback volume API. 2012-09-04 00:52:12 +02:00
Thomas Adamcik
14eeb20226 Update MPRIS to use playback.volume API. 2012-09-04 00:30:02 +02:00
Thomas Adamcik
114bc10ae8 Merge branch 'develop' into feature/switch-to-gst-mixers
Conflicts:
	mopidy/gstreamer.py
2012-09-03 22:54:22 +02:00
Stein Magnus Jodal
6b41806eea Merge remote-tracking branch 'adamcik/feature/simplify-outputs' into develop
Conflicts:
	docs/changes.rst
	mopidy/utils/settings.py
2012-09-03 22:08:52 +02:00
Thomas Adamcik
f6b96680ae Fix MPD volume command.
The command should return -1 when the volume is not known.
2012-09-01 22:07:15 +02:00
Thomas Adamcik
40502e41e5 Update tests to catch scaling problem in mixer.
- Fixes problem where 60% became 59% due to bad rounding.
- Tests assume scale of 0-65536 which matches ALSA.
- Check all possible values of set_volume and ensure we the right value out.
2012-09-01 14:35:20 +02:00
Thomas Adamcik
2b01860680 Make it possible to override GStreamer settings in tests.
- Specifically you can now pass in values instead of relying on global
  settings.
2012-09-01 14:01:11 +02:00
Thomas Adamcik
b796d7c859 Add create fakemixer element for testing.
- GStreamer tests now use this instead of a real mixer.
- fakemixer and the autoaudiomixer still need to be moved.
- We should probably use a fakesink as output as well.
2012-09-01 13:34:16 +02:00
Thomas Adamcik
2d5ba154ed Switch to module imports and with assertRaises in init_test. 2012-09-01 13:33:41 +02:00
Stein Magnus Jodal
fbc9aef828 Merge remote-tracking branch 'adamcik/feature/settings-did-you-mean' into develop 2012-09-01 13:29:13 +02:00
Stein Magnus Jodal
5c6dc96f9d Fix typo 2012-09-01 13:07:14 +02:00
Thomas Adamcik
e4d425d37a Add did you mean tests for settings.
- Checks varying degrees of typos until the edit distance becomes to large.
- Also updated did you mean to always uppercase it's input so we catch caps
  errors.
2012-09-01 12:28:32 +02:00
Thomas Adamcik
1f8289a256 Switch to only importing modules in settings_test. 2012-09-01 12:22:41 +02:00