Commit Graph

329 Commits

Author SHA1 Message Date
Thomas Adamcik
ab761c4596 core: Stop using kwarg based remove call 2015-04-17 00:00:58 +02:00
Thomas Adamcik
d2f9733296 core: Track.id was removed five years ago, update docs. 2015-04-17 00:00:58 +02:00
Thomas Adamcik
efad50c253 cleanup: Stop using deprecated copy() 2015-04-17 00:00:58 +02:00
Thomas Adamcik
2828432008 core: Deprecate remaining methods that used kwargs 2015-04-17 00:00:58 +02:00
Thomas Adamcik
2c31dbe47c core: Check correct query fields in core 2015-04-15 23:42:45 +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
512e51fba2 Merge pull request #1122 from jodal/feature/config-in-core
core: Get access to config
2015-04-09 15:00:40 +02:00
Stein Magnus Jodal
c5c9bc39e1 core: Get access to config
Needed for #997
2015-04-09 07:30:37 +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
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
Stein Magnus Jodal
c4940cbea2 autopep8: Add space after class signature/docstring 2015-04-03 00:05:26 +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
f4c93619d1 core: Make core tracklist.add(tracks=...) deprecation safe 2015-03-29 23:11:00 +02:00
Thomas Adamcik
d3b275e1a4 core: Mark tracklist.add by URI as deprecated 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
a54551d985 core: Mark get_playlists and filter as deprecated 2015-03-29 23:10:19 +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
Stein Magnus Jodal
a8e6cd26dc core: Warn if backend does not implement as_list()
Fixes #1080
2015-03-24 23:40:50 +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
Stein Magnus Jodal
4e30fb2f48 core: Make get_playlists() maintain folder hierarchy 2015-03-24 00:40:55 +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
Stein Magnus Jodal
07cf962434 Merge branch 'develop' into feature/new-playlists-api
Conflicts:
	docs/changelog.rst
2015-03-23 21:45:32 +01:00
Thomas Adamcik
f4452b22db core: Minor readability improvement 2015-03-23 15:02:37 +01:00
Stein Magnus Jodal
6815868e24 core: Doc Playlist.last_modified not being set
...if get_playlists() is called with include_tracks=False
2015-03-23 13:22:52 +01:00
Thomas Adamcik
6d22c4fd59 core: Remove set_current_tl_track 2015-03-23 00:50:05 +01:00
Thomas Adamcik
07f0453c6e core: Make event triggers internal 2015-03-23 00:50:05 +01:00
Thomas Adamcik
fd04cd918f core: Remove on_error_step from play arguments 2015-03-23 00:50:05 +01:00
Thomas Adamcik
ca02dbb676 core: Make change_track internal as it going away in 1.x 2015-03-23 00:50:05 +01:00
Stein Magnus Jodal
df604bb3e5 core: Deprecated playlists.filter() 2015-03-23 00:49:56 +01:00
Stein Magnus Jodal
bd2e4f7af0 core: Reimplement get_playlists() using new backend API 2015-03-23 00:44:39 +01:00
Stein Magnus Jodal
4f3a0839b3 core: Add playlists.as_list() and playlists.get_items(uri) 2015-03-23 00:44:39 +01:00
Stein Magnus Jodal
9462071e0c Merge pull request #1074 from adamcik/fix/1069-handle-broken-backends
core: Protect against old clients that implement backend.play
2015-03-23 00:05:05 +01:00
Thomas Adamcik
a74bc24bdc core: Protect against old clients that implement backend.play 2015-03-22 23:54:37 +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
Thomas Adamcik
efe9430c7a core: Update playback code to take change track into account.
This change has us checking the return value of change_track when deciding if
the play call was a success or if the track is unplayable. Which ensures that
the following can no longer happen: 1) play stream 2) play stream that fails
change_track 3) stream 1) continues playing. Correct behavior being the next
stream playing instead.
2015-03-22 22:12:51 +01:00
Stein Magnus Jodal
fe8d6aa4e8 core: Use 'must' instead of 'should' where appropriate 2015-03-22 21:28:35 +01:00