

def image(self, callback=None):
    "The playlist's :class:`Image`.\n\n        Due to limitations in libspotify's API you can't specify the\n        :class:`ImageSize` of these images.\n\n        If ``callback`` isn't :class:`None`, it is expected to be a callable\n        that accepts a single argument, an :class:`Image` instance, when\n        the image is done loading.\n\n        Will always return :class:`None` if the playlist isn't loaded or the\n        playlist has no image.\n        "
    image_id = ffi.new('char[20]')
    has_image = bool(lib.sp_playlist_get_image(self._sp_playlist, image_id))
    if (not has_image):
        return None
    sp_image = lib.sp_image_create(self._session._sp_session, image_id)
    return spotify.Image(self._session, sp_image=sp_image, add_ref=False, callback=callback)

dataset/ETHPy150Open mopidy/pyspotify/spotify/playlist.py Playlist.image/original