Require stored_playlists.save() to return the updated playlist (#217)
This commit is contained in:
parent
51aab4f138
commit
d03881f173
@ -63,6 +63,10 @@ backends:
|
||||
and all functionality is maintained by assigning to the playlists
|
||||
collections at the backend level.
|
||||
|
||||
- :meth:`mopidy.core.StoredPlaylistsController.save` now returns the saved
|
||||
playlist. The returned playlist may differ from the saved playlist, and
|
||||
should thus be used instead of the saved playlist.
|
||||
|
||||
**Changes**
|
||||
|
||||
- Made the :mod:`NAD mixer <mopidy.audio.mixers.nad>` responsive to interrupts
|
||||
|
||||
@ -136,8 +136,15 @@ class StoredPlaylistsController(object):
|
||||
"""
|
||||
Save the playlist to the set of stored playlists.
|
||||
|
||||
Returns the saved playlist. The return playlist may differ from the
|
||||
saved playlist. E.g. if the playlist name was changed, the returned
|
||||
playlist may have a different URI. The caller of this method should
|
||||
throw away the playlist sent to this method, and use the returned
|
||||
playlist instead.
|
||||
|
||||
:param playlist: the playlist
|
||||
:type playlist: :class:`mopidy.models.Playlist`
|
||||
:rtype: :class:`mopidy.models.Playlist`
|
||||
"""
|
||||
# TODO Support multiple backends
|
||||
return self.backends[0].stored_playlists.save(playlist).get()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user