diff --git a/docs/changelog.rst b/docs/changelog.rst index 4f49b8e5..0f9dacb6 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -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 -------------- diff --git a/mopidy/core/library.py b/mopidy/core/library.py index f254172f..30064e5a 100644 --- a/mopidy/core/library.py +++ b/mopidy/core/library.py @@ -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 diff --git a/mopidy/models/__init__.py b/mopidy/models/__init__.py index 9f93a01b..1e63d02f 100644 --- a/mopidy/models/__init__.py +++ b/mopidy/models/__init__.py @@ -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):