Commit Graph

85 Commits

Author SHA1 Message Date
Stein Magnus Jodal
75656b9b3d core: Address review comments 2016-01-03 21:07:15 +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
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
Thomas Adamcik
2b3e976bc9 core: Update title distinct name to track 2015-05-20 23:14:46 +02:00
Thomas Adamcik
31509ea568 core/mpd/local: Add title to get_distinct field types 2015-05-19 22:37:35 +02:00
Stein Magnus Jodal
d8bcd7f273 Rename mopidy.utils to mopidy.internal 2015-05-07 23:15:56 +02:00
Thomas Adamcik
c01f8679bc core: Address review comments for do not trust backends PR 2015-05-06 22:34:44 +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
83c2bf9bcd docs: Fix Sphinx syntax error 2015-05-03 23:32:35 +02:00
Thomas Adamcik
5f627984a3 review: Address review comments for one-of-validation 2015-04-26 23:35:00 +02:00
Thomas Adamcik
30f56abc66 core: Add "one-of" validation for number of kwargs 2015-04-25 00:56:11 +02:00
Nick Steel
4a48c381d6 docs: Make plurals in LibraryController consistent 2015-04-24 16:44:18 +01:00
Thomas Adamcik
58641100ce core: Add examples that shows that search is AND 2015-04-23 21:55:03 +02:00
Thomas Adamcik
b80bf615b5 core: Add exact param to docstring 2015-04-23 21:51:23 +02:00
Thomas Adamcik
2828432008 core: Deprecate remaining methods that used 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
2cc91c0a7f core: Fix review comments for PR#1111 2015-04-08 23:13:07 +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
928b8df08c core: Explain why we let LookupError through for search 2015-04-08 21:10:21 +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
Stein Magnus Jodal
4bb953f625 docs: Fix missing markup 2015-04-07 00:09:31 +02:00
Thomas Adamcik
34a88792f2 core: Create a unified code path for refresh calls 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
e2faf7f083 docs: Update docstring and changelog 2015-03-31 00:02:02 +02:00
Thomas Adamcik
bd1e822fea utils: Create warn and ignore deprecation warning helpers
This moves all the deprecation warnings messages to a central place so that it
is easy to match against them without having to redefine the same regex all
over the place.

Each message has been given a message id which is more or less
module.func:extra-info. This is not intended to be parsed, just used in tests
when using the ignore helper.
2015-03-30 23:48:08 +02:00
Thomas Adamcik
d44e8ff6f7 core: Add warning when doing library.search with a query.
Tests and code that rely on this are not yet "warnings safe".
2015-03-29 23:27:42 +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
Stein Magnus Jodal
394081ae27 core: Add quotes around 'exact' in warning 2015-03-25 00:40:59 +01: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
636d8f1115 core: Add verionadded annotations to LibraryController methods 2015-03-23 23:16:35 +01:00
Thomas Adamcik
81f2e5c6f0 core: Deprecate empty queries (Fixes #1072) 2015-03-23 23:09:31 +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
71e2b21b52 review: Minor fixes and updates 2015-03-18 23:09:09 +01:00
Thomas Adamcik
08bdf5c14b core: Update library.lookup() docstring 2015-03-18 00:10:45 +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
Stein Magnus Jodal
af87a17ff5 docs: Fix all warnings 2015-03-08 21:43:09 +01:00
Thomas Adamcik
8cc9c9bbc0 core: Rename list_distinct to get_distinct 2015-03-02 22:41:09 +01:00
Thomas Adamcik
00b2b9538e core: Add library.list_distinct for getting distinct field values 2015-03-02 00:26:06 +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
b7c71b84d5 core: Update get_images documenatation 2015-02-12 23:51:20 +01:00
Thomas Adamcik
c0b0e3657a core: Add core.library.get_images 2015-02-12 22:38:42 +01:00
Stein Magnus Jodal
496142c201 py3: Use absolute imports by default 2014-12-07 20:17:10 +01:00
Stein Magnus Jodal
069ef2ae7d core: Use a set to get unique dirs, and sorted to make the output stable 2014-07-01 23:31:12 +02:00
dz0ny
d871ca9128 Remove duplicates from library root.
Closes #708
2014-06-26 16:27:22 +02:00