Commit Graph

2260 Commits

Author SHA1 Message Date
Thomas Adamcik
f42a5423ab tests: Add a TODO to the dummy audio helper 2015-09-16 23:41:03 +02:00
Thomas Adamcik
c1d21bd6c9 tests: Make sure mpd tests wait for core when changing state. 2015-09-16 23:38:15 +02:00
Stein Magnus Jodal
729249fffd Merge branch 'release-1.1' into develop 2015-09-14 10:41:32 +02:00
Stein Magnus Jodal
9fb92139ec tests: Remove version ordering test
I believe we're able to choose proper version numbers without the
busy-work of updating this test.
2015-09-14 10:40:48 +02:00
Stein Magnus Jodal
ffdf4bf691 Merge branch 'release-1.1' into develop
Conflicts:
	docs/changelog.rst
2015-09-14 10:36:34 +02:00
Stein Magnus Jodal
6e126ee850 stream: Abort unwrap if visiting same URI twice 2015-09-14 10:12:31 +02:00
Stein Magnus Jodal
2d10eef0b1 stream: Expand nested stream playlists
Fixes #1250
2015-09-13 23:26:45 +02:00
Stein Magnus Jodal
9de96a81f8 http: Move tests from stream to http util 2015-09-13 11:56:16 +02:00
Thomas Adamcik
5c46b83f81 stream: Switch to using http download helper 2015-09-13 11:56: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
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
Thomas Adamcik
d8986e6cc1 audio: Tell dummy_audio what urls to fail on 2015-09-04 15:28:32 +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
Stein Magnus Jodal
f6f65dd3dc Merge pull request #1276 from adamcik/feature/make-local-playback-test-use-core-proxy
local: Update playback test to use core as a running actor
2015-09-04 13:45:36 +02:00
Thomas Adamcik
0aeafa714b local: Update playback test to use core as a running actor 2015-09-04 11:41:10 +02:00
Stein Magnus Jodal
f655fc7009 ext: Make get_{cache,config,data}_dir() class methods
Fixes #1275
2015-09-04 10:20:04 +02:00
Thomas Adamcik
1acc5aa557 audio: Update tests to reflect send_async being gone 2015-09-03 23:01:19 +02:00
Thomas Adamcik
71b04213ff audio: Update dummy and tests to correctly emit stream changed 2015-09-03 21:39:30 +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
Stein Magnus Jodal
c48b6515f9 core: library.refresh() should check if backend has library
...and not playlists.

Fixes #1257
2015-08-23 00:35:54 +02:00
Stein Magnus Jodal
78ffaeb8d2 playlists: Fix crash on urilist comment with non-ASCII chars
Fixes #1265
2015-08-22 23:52:19 +02:00
Thomas Adamcik
3e75d5cf06 audio: Update missing plugins check in scanner tests 2015-08-19 00:40:46 +02:00
Thomas Adamcik
e77a4afaf4 audio: Make scanner report MIME for missing plugins 2015-08-18 23:56:42 +02:00
Stein Magnus Jodal
9f08bce6cd core: Update test 2015-08-11 10:06:58 +02:00
Stein Magnus Jodal
83010813a1 Bump version to 1.1.0 2015-08-09 23:43:42 +02:00
Stein Magnus Jodal
a16a2c5a1b tests: Fix test made flaky by lsinfo Last-Modified change 2015-08-07 15:35:07 +02:00
Stein Magnus Jodal
86e0d12a8c Merge pull request #1193 from glogiotatidis/m3u8loading
Support loading of m3u8 playlists.
2015-08-07 15:21:39 +02:00
Giorgos Logiotatidis
69dc639ab3 Support loading of m3u8 playlists.
Unicode is nice, let's support it!
2015-08-07 14:35:54 +03:00
Thomas Adamcik
0081e2deff Merge pull request #1243 from jodal/feature/fast-mpd-listplaylists
mpd: Faster playlist listing
2015-08-06 20:29:12 +02:00
Stein Magnus Jodal
c8d31e94b7 mpd: Faster playlist listing 2015-08-06 01:06:43 +02:00
Stein Magnus Jodal
b51ee01c7c Merge pull request #1242 from bjornars/fix/1240-tests-fail-on-32-bit
tests: fix test breakage due to promotion from int to long
2015-08-05 22:46:32 +02:00
Bjørnar Snoksrud
1eb41aca7d tests: fix test breakage due to promotion from int to long
This fixes #1240.

In internals/path.py. there is a snippet of code that multiples mtime
for a file with 1000, and then casting it to `int`, to return the number
of milliseconds since epoch (or whatever). This will, however, not
ensure that the result is an `int`.

>>> type(int(2**32))
<type 'long'>

Instead, fix the tests to look for (int, long), and clarify the
implementation.

This bug found on a 32-bit VM :)
2015-08-05 22:38:21 +02:00
Thomas Adamcik
2faf6689c1 Merge pull request #1230 from fatg3erman/feature/mpd-protocol-extensions
mpd: Add additional metadata fields for album URIs and image URIs
2015-07-27 22:28:22 +02:00
Stein Magnus Jodal
3810089be3 tests: Avoid import errors during conftest setup 2015-07-27 13:41:29 +02:00
Mark Greenwood
9649dc0777 list order in python is not deterministic, hence had to change the test 2015-07-26 13:57:46 +01:00
Mark Greenwood
310fcdf0ef Unexpected test failure fixed 2015-07-26 13:04:33 +01:00
Mark Greenwood
8106399598 Simplify the whole thing by using taglist types and not bothering with the
config option or command to switch it on
2015-07-26 12:55:46 +01:00
Stein Magnus Jodal
0dc47e6084 Merge pull request #1232 from dprokic/feature/843-core-config-for-data-config-cache-dirs
config: Add config for data/config/cache directories
2015-07-26 12:25:58 +02:00
Stein Magnus Jodal
36dea42100 Merge pull request #1235 from EricJahn/fix/1045-filter-empty-fields
Conflicts:
	docs/changelog.rst
2015-07-26 12:14:13 +02:00
Thomas Adamcik
ee68a0a9da Merge pull request #1238 from dbrgn/feature/996-playlist-delete-event
core: Implemented playlist_deleted event triggering
2015-07-26 12:12:23 +02:00
Stein Magnus Jodal
70cfc0b33a mpd: PR #1235 tweaks, add changelog 2015-07-26 12:12:15 +02:00
Danilo Bargen
8975e72b34 Implemented playlist_deleted event 2015-07-26 11:57:17 +02:00
Thomas Adamcik
61bb7df64d Merge pull request #1239 from jodal/feature/stream-playlists
stream/audio: Make stream backend parse radio playlists itself
2015-07-26 11:48:19 +02:00
Stein Magnus Jodal
d991e51d40 stream: Extract first track from playlists 2015-07-26 11:24:39 +02:00
Stein Magnus Jodal
f373d071ea stream: Move scanner to backend, port tests to pytest 2015-07-26 00:09:58 +02:00
Stein Magnus Jodal
ea2017c968 playlists: Add urilist fallback parser 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
80adc100ae playlists: Add blank lines to valid playlist data 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
12c27142a3 playlists: Rename M3U to EXTM3U 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
6af11b563f playlists: Add parse() that detects format and parses 2015-07-25 23:19:59 +02:00
Stein Magnus Jodal
2bcbbf03be playlists: Simplify detector/parser interface 2015-07-25 23:19:59 +02:00
Dejan Prokić
5f843100cc tests: Add tests for getter methods for cache, config and data directories 2015-07-25 18:17:27 +02:00
Mikhail Golubev
b596b85571 Add "sortname" field in the Artist model (#940) 2015-07-25 17:25:28 +02:00
Dejan Prokić
13133fd919 tests: Make test_ext discoverable
Classes in this test didn't have prefix Test
2015-07-25 17:17:13 +02:00
EricJahn
e0dc26f958 Fix #1045
Filter all empty tagtypes in MPD protocol handlers.

In addition return the tagtype list from the mpd protocol command.
2015-07-25 16:56:34 +02:00
Dejan Prokić
1e716c7139 tests: Add tests for defaults in core schema config
Tests check if default core schema has cache_dir, config_dir, data_dir and max_tracklist_length and if they have proper type
2015-07-25 16:04:39 +02:00
Stein Magnus Jodal
bdcfab09f1 playlists: Move detecters and parsers out of audio 2015-07-25 14:47:01 +02:00
Stein Magnus Jodal
a83d9836f9 core: Update test mock 2015-07-25 14:47:00 +02:00
Stein Magnus Jodal
bd13dcdcdd Merge pull request #1231 from stein-k/missing_config
Fixes #1228
2015-07-25 14:24:45 +02:00
Stein Magnus Jodal
0ae6239988 config: Add regression test for format_initial() 2015-07-25 14:23:13 +02:00
EricJahn
ad2646f1ab tests: Fix failing encoding test
Encoding is different on Mac OS and needs to be checked separately.
2015-07-25 13:15:37 +02:00
Stein Magnus Jodal
448e929e75 file: Add todos for missing tests 2015-07-25 11:59:29 +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
Stein Magnus Jodal
fdb0b4a12b file: Add tests 2015-07-22 19:48:05 +02:00
Stein Magnus Jodal
80e33e273c Merge branch 'v1.0.x' into develop
Conflicts:
	docs/changelog.rst
2015-07-22 18:41:17 +02:00
Stein Magnus Jodal
cf9c950915 Bump version to 1.0.8 2015-07-22 18:30:41 +02:00
Stein Magnus Jodal
0ebfeb5a5b core: Normalize negative seek positions
This reverts a change between 1.0 and 1.1, so no changelog.

Fixes #1180
2015-07-22 12:15:38 +02:00
Stein Magnus Jodal
6cb48f29ce mpd: Simplify Last-Modified test, update changelog 2015-07-22 11:21:04 +02:00
Stein Magnus Jodal
1d77bc74e2 Merge pull request #1219 from fatg3erman/fix/1218-last-modified-for-mpd
Fix #1218
2015-07-22 11:12:30 +02:00
Mark Greenwood
eab3076235 Add test for track.last_modified = 0 2015-07-21 21:13:38 +01:00
Mark Greenwood
6ed9b07aaa Fix #1218
Output the last_modified timestamp from mopidy's track model to mpd clients
in the same format as mpd uses - yyyy-mm-ddTHH:MM:SS

Outputs nothing for Last-Modified if last_modified is None or zero

This commit uses UTC time, adds a 'Z' to end, and updates the test accordingly
2015-07-21 18:20:17 +01:00
Stein Magnus Jodal
073d368c82 Merge branch 'v1.0.x' into develop
Conflicts:
	docs/changelog.rst
	mopidy/mpd/translator.py
	tests/core/test_library.py
2015-07-21 18:36:13 +02:00
Stein Magnus Jodal
fb859a9f23 m3u: Fix crash if playlist filename is not decodable
...with the current file system encoding

Fixes #1209
2015-07-21 18:31:21 +02:00
Stein Magnus Jodal
c88cf5ee82 mpd: Add listfiles command skeleton 2015-07-21 15:04:29 +02:00
Stein Magnus Jodal
2135b1372a mpd: Add mount/unmount/listmounts/listneighbors command skeletons 2015-07-21 14:50:51 +02:00
Stein Magnus Jodal
21a3b74e9b mpd: Add addtagid/cleartagid command skeleton 2015-07-21 14:30:18 +02:00
Stein Magnus Jodal
0a662c42b0 mpd: Add prio/prioid command skeleton 2015-07-21 14:18:28 +02:00
Stein Magnus Jodal
7b711e4dac mpd: Add rangeid command skeleton 2015-07-21 14:12:01 +02:00
Stein Magnus Jodal
c382a58564 tests: Fix another error in mock usage 2015-07-21 00:34:27 +02:00
Stein Magnus Jodal
a1200d38f4 tests: Fix typo in mock usage
The error was made evident by a newer mock version that no longer
swallowed the wrong assert as regular use of a spec-less mock.
2015-07-20 19:48:15 +02:00
Thomas Adamcik
1a967d3d22 mpd: Add tests for stream title handling 2015-07-20 19:25:39 +02:00
Ronald Zielaznicki
82ed660777 Add core config values to relevent test cases. 2015-07-19 23:05:39 -04:00
Stein Magnus Jodal
87bf261345 tests: Fix typo in mock usage
The error was made evident by a newer mock version that no longer
swallowed the wrong assert as regular use of a spec-less mock.
2015-07-16 21:33:02 +02:00
Mark Greenwood
38ca65a0b6 Fix #1218 - Last-Modified timestamp for tracks
Don't know why the Travis build failed, it's passing for me
2015-07-13 06:43:46 +01:00
Mark Greenwood
6d2ac7a100 Fix #1218
Output a track's Last-Modified stamp in ISO 8601 format, as MPD does.

Output nothing if track has no last-modified stamp.

The test has to use datetime to work out what the output will look like,
because it is local-time zone dependant.
2015-07-13 06:35:34 +01:00
Mark Greenwood
5c6ab0846e Fix #1218
Output the last_modified timestamp from mopidy's track model to mpd clients
in the same format as mpd uses - yyyy-mm-ddTHH:MM:SS

Outputs nothing for Last-Modified if last_modified is None
2015-07-12 21:39:27 +01:00
Mark Greenwood
f3f140c19f mpd:Update protocol to 0.19
Address issues raised in review:
Fix formatting by shortening function name to concat_multi_values
Change comments and variable names to reflect generic nature of function
Fix typos in tests
Default to single quotes for strings
2015-07-06 09:26:52 +01:00
Mark Greenwood
a2f2d5f167 mpd:Update protocol to 0.19
Update tests to reflect new function names
2015-07-05 13:40:45 +01:00
Stein Magnus Jodal
3b1b0dd2e9 Merge branch 'v1.0.x' into develop 2015-06-26 12:48:03 +02:00
Stein Magnus Jodal
bc2f56d0bf Bump version to 1.0.7 2015-06-26 00:34:59 +02:00
Stein Magnus Jodal
749c8baceb Merge branch 'v1.0.x' into develop
Conflicts:
	mopidy/core/library.py
	tests/core/test_playback.py
2015-06-25 23:15:35 +02:00
Stein Magnus Jodal
f60ffdf336 Bump version to 1.0.6 2015-06-25 22:26:12 +02:00
Thomas Adamcik
9d087ff94d Merge branch 'v1.0.x' of github.com:mopidy/mopidy into v1.0.x
Conflicts:
	docs/changelog.rst
2015-06-24 22:12:09 +02:00
Naglis Jonaitis
feb9963a8e mpd: Ignore tracks without length in the "count" command 2015-05-28 01:40:38 +03:00
Thomas Adamcik
1d636ce59e core: Make sure track gets changed while paused 2015-05-20 23:26:55 +02:00
Thomas Adamcik
2b3e976bc9 core: Update title distinct name to track 2015-05-20 23:14:46 +02:00
Stein Magnus Jodal
10b0796bbd Merge branch 'v1.0.x' into develop 2015-05-19 22:08:56 +02:00
Stein Magnus Jodal
b0a776114d Bump version to 1.0.5 2015-05-19 22:05:20 +02:00
Stein Magnus Jodal
ad449a879d Merge pull request #1178 from adamcik/feature/robust-startup-part1
Make initial bootstrapping handle bad extensions
2015-05-12 23:43:11 +02:00
Thomas Adamcik
d630a97bc1 ext: Refactor tests based on review comments 2015-05-12 22:00:31 +02:00
Thomas Adamcik
8b6553ec16 ext: Update validate_extension to validate_extension_data
Adds more checks to catch extension errors and importantly tests for exercise
these code paths.
2015-05-11 22:30:50 +02:00
Thomas Adamcik
4566ddd9ae ext: Add exception logging to extension loading 2015-05-11 21:29:03 +02:00
Thomas Adamcik
8ed9e5f1e0 ext: Catch exceptions in extension helpers 2015-05-11 21:20:37 +02:00
Thomas Adamcik
8434a22c83 ext: Switch to using fixtures for mocking 2015-05-11 20:53:50 +02:00
Thomas Adamcik
5550785146 ext: Wrap extension state in a ExtensionData tuple
This allows us to do more of the data loading that might fail safely in the
mopidy.ext module instead of having things spread all over the place.

Note that only minimal changes have been made to __main__ to make things work.
Further refactoring should follow.
2015-05-11 00:33:41 +02:00
Thomas Adamcik
5937cdc3b2 ext: Add tests for validate_extension and handle validate_environment failures 2015-05-10 23:15:13 +02:00
Thomas Adamcik
c4e18f4218 ext: Add ext.load_extensions tests and basic error handling 2015-05-10 23:00:13 +02:00
Thomas Adamcik
f814e945d3 tests: Convert ext test to pytests 2015-05-10 21:49:04 +02:00
Thomas Kemmer
ea5dff109e m3u: Fix encoding error when saving playlists with non-ASCII track titles. 2015-05-10 20:57:39 +02:00
Thomas Adamcik
95dc30288c httpclient: Fix import in tests 2015-05-09 00:52:29 +02:00
Thomas Adamcik
f6f445e4b6 Merge branch 'develop' into feature/http-helpers
Conflicts:
	docs/changelog.rst
2015-05-09 00:45:09 +02:00
Thomas Adamcik
382aa0a775 httpclient: Move to top level module 2015-05-09 00:44:16 +02: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
af4e7c8a4e Merge branch 'develop' into feature/core-dont-trust-backends
Conflicts:
	docs/changelog.rst
2015-05-07 00:15:33 +02:00
Thomas Adamcik
29c66f7bc8 core: Correct volume/mute return values 2015-05-07 00:13:58 +02:00
Thomas Adamcik
4d608dd431 core: Add get_current_tlid shortcut 2015-05-06 23:00:53 +02:00
Thomas Adamcik
cfd4dcb8dd Merge branch 'develop' into feature/core-dont-trust-backends
Note that this merge also updated core.playlists.create to combine the 1.0.5
fix with these changes.

Conflicts:
	mopidy/core/playlists.py
2015-05-06 22:44:12 +02:00
Thomas Adamcik
c01f8679bc core: Address review comments for do not trust backends PR 2015-05-06 22:34:44 +02:00
Stein Magnus Jodal
6d82cdb611 tests: Cleanup reset_mock() usage 2015-05-06 21:06:30 +02:00
Stein Magnus Jodal
a17c413a70 Merge branch v1.0.x into develop 2015-05-06 20:47:52 +02:00
Thomas Kemmer
636639a201 Fix #1162: Ignore None results and exceptions from PlaylistsProvider.create(). 2015-05-06 14:50:21 +02:00
Thomas Adamcik
4aa984207b tests: Split up core bad backend tests and unify naming 2015-05-06 01:01:12 +02:00
Thomas Adamcik
e7b241e18b core: Update playlists to handle bad data from backends and exceptions 2015-05-06 00:28:58 +02:00
Thomas Adamcik
3426633c78 core: Make sure we handle bad mixer data and exceptions. 2015-05-05 23:41:46 +02:00
Thomas Adamcik
dd4a8f3b78 core: Make sure library can handle bad data from backends
Note that None values are just ignored, while other bad data logs an error
message and is ignored.
2015-05-05 22:55:53 +02:00
Stein Magnus Jodal
746c3059ba Merge pull request #1160 from adamcik/feature/model-corner-case-handling
Move new models features to new class
2015-05-05 08:08:05 +02:00
Thomas Adamcik
b480311d66 models: Add ValidatedImmutableObject and "revert" ImmutableObject
Testing with extension that use custom models it was discovered that the
changes to have type safe models were a bit to invasive to be suitable for a
minor release. This change fixes this by bringing back ImmutableObjects in
their old form, and moving the shinny new features to ValidatedImmutableObject.

A subset of the tests for ImmutableObjects have been resurrected to have some
confidence in this working the way we think it should.
2015-05-04 23:41:11 +02:00
Thomas Adamcik
7f6809aebb models: Explicitly define which models can be deserialized 2015-05-04 22:36:27 +02:00
Thomas Adamcik
07159f69c2 models: Decouple fields tests from the model metaclass 2015-05-04 21:37:17 +02:00
Thomas Adamcik
bb95dc3b9b models: Make sure parent fields are used by children.
Without this change any sub-class would end up with an empty _fields and none
of the actual fields would be writable even internally.
2015-05-03 22:58:43 +02:00
Stein Magnus Jodal
b4a6a4da7f Merge branch 'v1.0.x' into develop 2015-04-30 08:44:10 +02:00
Stein Magnus Jodal
2f96dacae8 Bump version to 1.0.4 2015-04-30 08:41:03 +02:00
Thomas Adamcik
94039e06dc models: Make sure sub-classes can extend models 2015-04-29 21:32:43 +02:00
Thomas Adamcik
9182a7870e utils: Support opting out of adding auth to proxy 2015-04-29 00:38:06 +02:00
Thomas Adamcik
8cf9da3d55 utils: Fix corner case in format_proxy scheme handling 2015-04-29 00:27:56 +02:00
Thomas Adamcik
5153d9e19f utils: Add format_user_agent helper 2015-04-28 23:51:19 +02:00
Thomas Adamcik
a48aadaaed utils: Add basic format proxy helper 2015-04-28 23:50:52 +02:00
Thomas Adamcik
8851fb151c models: Allow Ref.type to have any value
This is to address a potential breakage brought up in #1150 as it turns out
Mopidy-Podcast uses custom models and ref types.
2015-04-28 22:58:15 +02:00
Stein Magnus Jodal
97c336200b Merge branch 'v1.0.x' into develop 2015-04-28 00:02:26 +02:00
Stein Magnus Jodal
9c2aabb899 Bump version to 1.0.3 2015-04-28 00:00:25 +02:00
Stein Magnus Jodal
b14aee3e04 Merge branch 'v1.0.x' into develop
Conflicts:
	docs/changelog.rst
2015-04-27 00:18:41 +02:00
Stein Magnus Jodal
21289f8fe5 Bump version to 1.0.2 2015-04-27 00:02:12 +02:00
Thomas Adamcik
651e89357f tests: Fix IssueGH1120RegressionTest flakiness 2015-04-26 23:23:30 +02:00
Thomas Adamcik
7e59a5aecb models: Split models into smaller modules 2015-04-25 00:11:41 +02:00
Thomas Adamcik
b3ea425fd0 tests: Fix IssueGH1120RegressionTest flakiness 2015-04-24 19:26:02 +02:00
Stein Magnus Jodal
3dba4f4208 Merge branch 'v1.0.x' into develop 2015-04-23 23:40:04 +02:00
Stein Magnus Jodal
9c793a38ff Bump version to 1.0.1 2015-04-23 23:35:45 +02:00
Thomas Adamcik
d4c695ac75 mpd: Split browse and playlist name to uri caching 2015-04-23 23:08:25 +02:00
Thomas Adamcik
a62293c316 core: Add play(tlid) support 2015-04-22 20:55:51 +02:00
Thomas Adamcik
fba4069cfd core: Make index return current index when missing args 2015-04-19 00:22:52 +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
Stein Magnus Jodal
7752ebe7e4 Merge pull request #1130 from adamcik/feature/more-deprecation-cleanups
More deprecations and correspoding cleanups
2015-04-17 00:18:28 +02:00
Thomas Adamcik
09027854c6 validation: Reject iterators as core arguments
iter() always never re-wraps an iterator, so 'iter(i) is iter(i)' tests if we
wrapped a container or if we already had an iterator. I also tried
types.GeneratorType and inspect helpers but they did not work for this use
case.
2015-04-17 00:05:46 +02:00
Thomas Adamcik
81fd426caf tests: Update tests to not used deprecated kwargs 2015-04-17 00:00:58 +02:00
Thomas Adamcik
efad50c253 cleanup: Stop using deprecated copy() 2015-04-17 00:00:58 +02:00
Stein Magnus Jodal
e265f5d673 Merge pull request #1128 from adamcik/feature/validate-core-input
Validate core inputs
2015-04-16 07:45:17 +02:00
Thomas Adamcik
98587f5098 review: Fix test name 2015-04-15 23:48:44 +02:00
Thomas Adamcik
97235f9441 core: Don't allow TLIDs in queries, or integers
Handle this in tracklist.filter() which is the only API that allows number
and/or TLIDs.
2015-04-14 23:46:20 +02:00
Thomas Adamcik
324bec1f4a core: Validate core API calls 2015-04-14 23:45:56 +02:00
Thomas Adamcik
8646ba4252 utils: Add validation helpers for verifying core APIs 2015-04-14 23:16:12 +02:00
Stein Magnus Jodal
093c4340cd Merge branch 'v1.0.x' into develop
Conflicts:
	mopidy/audio/scan.py
	tests/audio/test_scan.py
2015-04-13 08:19:14 +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
1b10a783d3 mpd: Update tests to use setters and actual booleans 2015-04-13 00:16:09 +02:00
Stein Magnus Jodal
f85ea2a39d flake8: Fix new import order warnings
(cherry picked from commit 71ab9733c7)
2015-04-12 23:05:53 +02:00
Stein Magnus Jodal
71ab9733c7 flake8: Fix new import order warnings 2015-04-12 23:03:46 +02:00
Thomas Adamcik
20019edf2d models: Fix review comments 2015-04-12 16:03:51 +02:00
Thomas Adamcik
6327a67874 models: Make sure we really only add __weakref__ once 2015-04-11 00:47:53 +02:00
Thomas Adamcik
9bc4d8b713 audio: Make scanner handle all media types.
I don't think this makes anything slower, as before we would still decode
anything we came across in the hopes that we find raw audio.
2015-04-11 00:29:07 +02:00
Stein Magnus Jodal
c367d350f7 Merge pull request #1117 from adamcik/feature/models-memory-reduction
Improve models memory usage
2015-04-08 23:29:08 +02:00
Thomas Adamcik
2cc91c0a7f core: Fix review comments for PR#1111 2015-04-08 23:13:07 +02:00
Thomas Adamcik
e5f59495fc core: Update refresh test case to fail on multiple calls to same backend 2015-04-08 21:18:18 +02:00
Thomas Adamcik
511cf4e326 core: Catch exceptions when browsing in backends
Also splits browse into to method to better distinguish the two possible code
paths.
2015-04-08 21:17:44 +02:00
Thomas Adamcik
682c6b1c6c Merge branch 'develop' into feature/make-core-more-robust
Conflicts:
	docs/changelog.rst
2015-04-08 20:28:10 +02:00
Thomas Adamcik
05244f7e60 models: Deprecate copy and add replace method
Changed as with the memoization copy was lying, so replace is a better name.
2015-04-08 01:41:50 +02:00
Thomas Adamcik
b7375323e9 models: Memoize identical instances automatically
This combined with the previous changes has brought the memory use for a 14k
track test-set down from about 75MB to 17MB or so. Note that this does however,
mean that copy is now lying to us as it does not such thing whenever it can
avoid it.
2015-04-08 01:14:56 +02:00
Thomas Adamcik
86481b1d50 models: Shortcut case where copy didn't change anything
We no longer copy in this case and will just give you the same instance back.
2015-04-08 00:34:02 +02:00
Thomas Adamcik
0fee1b4b11 models: Switch to slots to reduce memory usage per instance 2015-04-08 00:30:53 +02:00
Thomas Adamcik
08fd99ffdb models: Add Identifer type which interns values.
This gives some moderate memory saving since the values are used in multiple
places.
2015-04-08 00:11:23 +02:00
Stein Magnus Jodal
7bda4f835f xdg: Add XDG dir utils 2015-04-07 23:50:59 +02:00
Thomas Adamcik
9b442e1563 review: Address review comments 2015-04-06 23:27:46 +02:00
Thomas Adamcik
50f68064be core: Update PlaylistsController to catch backend exceptions 2015-04-06 02:13:51 +02:00
Thomas Adamcik
66771dec68 core: Update LibraryController to catch backend exceptions 2015-04-06 02:12:56 +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
2d03cd7290 models: Make fields handle unsetting defaults in __dict__ 2015-04-05 13:09:19 +02:00
Thomas Adamcik
73415ce60f models: Make sure del on attributes does not work 2015-04-05 13:08:15 +02:00
Thomas Adamcik
07912e1091 models: Add fields for supporting validation of models
Feature makes use of python descriptors to hook in type checking and other
validation when fields get set.
2015-04-05 13:08:15 +02:00
Thomas Adamcik
5c0430ef4a tests: Move models tests into a directory 2015-04-05 13:08:15 +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
83c3d0013f Merge pull request #1096 from jodal/feature/faster-travis-build
travis: Use new faster build infrastructure
2015-04-02 21:41:43 +02:00
Stein Magnus Jodal
2bc63ec027 audio: Skip MP3 tests if missing plugin 2015-04-02 20:53:29 +02:00
Thomas Adamcik
9ede14f4a1 tests: Convert to using deprecation helpers across the board. 2015-03-30 23:50:54 +02:00
Thomas Adamcik
f4c93619d1 core: Make core tracklist.add(tracks=...) deprecation safe 2015-03-29 23:11:00 +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
c85689edad mpd: Make mpd warnings safe with respect to tracklist.add(tracks=...) 2015-03-29 23:11:00 +02:00
Thomas Adamcik
f7399c1849 tests: Stop using playlist filters in mpd music_db tests 2015-03-29 23:11:00 +02:00