models: Deprecate Album.images

Fixes #1325
This commit is contained in:
Stein Magnus Jodal 2015-11-18 15:03:12 +01:00
parent cc9a382f77
commit e48ac186f0
3 changed files with 15 additions and 4 deletions

View File

@ -16,6 +16,13 @@ Core API
- Start ``tlid`` counting at 1 instead of 0 to keep in sync with MPD's
``songid``.
Models
------
- **Deprecated:** :attr:`mopidy.models.Album.images` is deprecated. Use
:meth:`mopidy.core.LibraryController.get_images` instead. (Fixes:
:issue:`1325`)
Local backend
--------------

View File

@ -149,7 +149,7 @@ class LibraryController(object):
"""Lookup the images for the given URIs
Backends can use this to return image URIs for any URI they know about
be it tracks, albums, playlists... The lookup result is a dictionary
be it tracks, albums, playlists. The lookup result is a dictionary
mapping the provided URIs to lists of images.
Unknown URIs or URIs the corresponding backend couldn't find anything

View File

@ -146,6 +146,10 @@ class Album(ValidatedImmutableObject):
:type musicbrainz_id: string
:param images: album image URIs
:type images: list of strings
.. deprecated:: 1.2
The ``images`` field is deprecated.
Use :meth:`mopidy.core.LibraryController.get_images` instead.
"""
#: The album URI. Read-only.
@ -170,10 +174,10 @@ class Album(ValidatedImmutableObject):
musicbrainz_id = fields.Identifier()
#: The album image URIs. Read-only.
#:
#: .. deprecated:: 1.2
#: Use :meth:`mopidy.core.LibraryController.get_images` instead.
images = fields.Collection(type=compat.string_types, container=frozenset)
# XXX If we want to keep the order of images we shouldn't use frozenset()
# as it doesn't preserve order. I'm deferring this issue until we got
# actual usage of this field with more than one image.
class Track(ValidatedImmutableObject):