Commit Graph

36 Commits

Author SHA1 Message Date
Nick Steel
d6eff50597 core: Fix library.lookup with an empty uri list. Fixes #1619. 2017-06-15 00:10:06 +01:00
Stein Magnus Jodal
094a874055 core: Make lookup() ignore tracks without URI
Fixes #1340
2016-01-01 23:44:26 +01: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
d8bcd7f273 Rename mopidy.utils to mopidy.internal 2015-05-07 23:15:56 +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
Thomas Adamcik
4aa984207b tests: Split up core bad backend tests and unify naming 2015-05-06 01:01:12 +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
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
66771dec68 core: Update LibraryController to catch backend exceptions 2015-04-06 02:12: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
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
f5f9899db9 tests: Make bases test classes in core 2015-03-29 23:10:58 +02:00
Thomas Adamcik
5a3fb64250 core: Emit deprecation warning for library.find_exact 2015-03-29 23:08:03 +02: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
Thomas Adamcik
141c14ad45 core: Add exact to search() and deprecate find_exact()
Backends that still implement find_exact will be called without exact as an
argument to search, and we will continue to use find_exact. Please remove
find_exact from such backends and switch to the new search API.
2015-03-24 09:31:03 +01:00
Thomas Adamcik
24fe242d56 core/backend: Remove find_exact from backends
Functionality has been replaced with an `exact` param in the search method.
Backends that still implement find_exact will continue being called via
the old method for now.
2015-03-23 23:55:03 +01:00
Thomas Adamcik
7ec2342921 core: Normalize search queries
This is needed as otherwise each and every backend needs to handle the fact
that some "bad" clients might send {'field': 'value'} instead of
{'field': ['value']} Though the real problem isn't the clients but our
organically grown query API.
2015-03-22 23:33:49 +01:00
Stein Magnus Jodal
f67e55618c core: Make lookup(uris=...) return dict with all uris
All uris given to lookup should be in the result even if there is no
backend to handle the uri, and the lookup result thus is an empty list.

As a side effect, future.get() is now called in the order of the URIs
in the `uris` list, making it easier to mock out
backend.library.lookup() in core layer tests.
2015-03-21 00:11:15 +01:00
Thomas Adamcik
fdc84c3905 core: Add uris argument to library.lookup (Fixes #1008)
For now this doesn't add any corresponding APIs to backends, or for that matter
tracklist.add(uris). This is just to get the API in for clients in 0.20.
2015-03-17 23:49:21 +01:00
Thomas Adamcik
ddd872cdea core: Always return an answer for all URIs in get_images
Also make sure that results are tuples instead of lists so we don't
accidentally give out mutable state.
2015-02-13 00:10:14 +01:00
Thomas Adamcik
533948f8f8 core: Make sure we return list of images in get_images tests 2015-02-12 23:10:20 +01:00
Thomas Adamcik
c0b0e3657a core: Add core.library.get_images 2015-02-12 22:38:42 +01:00
Thomas Adamcik
fa8547c397 tests: Add noqa markers for setUp/tearDown 2014-12-30 00:23:01 +01:00
Stein Magnus Jodal
496142c201 py3: Use absolute imports by default 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
6d6bc4b808 core: Use new mixer API 2014-07-08 01:11:25 +02:00
dz0ny
d871ca9128 Remove duplicates from library root.
Closes #708
2014-06-26 16:27:22 +02:00
Stein Magnus Jodal
b754885064 Fix all import order warnings 2014-05-07 20:08:43 +02:00
Thomas Adamcik
999f478010 core: Update browse to use uri isntead of path 2014-01-17 17:16:24 +01:00
Thomas Adamcik
826419d829 backend/core: Switch to root_directory instead of name 2014-01-16 22:53:18 +01:00
Stein Magnus Jodal
c781f77ef3 Rename test files to pattern expected by test runners 2014-01-15 00:01:50 +01:00