backend: Remove playlists.playlists property
This commit is contained in:
parent
e3f2e368c7
commit
d37bd62bb1
@ -94,7 +94,7 @@ v1.0.0 (UNRELEASED)
|
|||||||
:attr:`mopidy.backend.PlaylistsProvider.playlists`. This is potentially
|
:attr:`mopidy.backend.PlaylistsProvider.playlists`. This is potentially
|
||||||
backwards incompatible. (PR: :issue:`1046`)
|
backwards incompatible. (PR: :issue:`1046`)
|
||||||
|
|
||||||
- Changed the API for :class:`mopidy.backend.PlaybackProvider`, note that this
|
- Changed the API for :class:`mopidy.backend.PlaybackProvider`. Note that this
|
||||||
change is **not** backwards compatible for certain backends. These changes
|
change is **not** backwards compatible for certain backends. These changes
|
||||||
are crucial to adding gapless in one of the upcoming releases.
|
are crucial to adding gapless in one of the upcoming releases.
|
||||||
(Fixes: :issue:`1052`, PR: :issue:`1064`)
|
(Fixes: :issue:`1052`, PR: :issue:`1064`)
|
||||||
@ -113,6 +113,16 @@ v1.0.0 (UNRELEASED)
|
|||||||
|
|
||||||
- :meth:`mopidy.backend.PlaybackProvider.prepare_change` has been added.
|
- :meth:`mopidy.backend.PlaybackProvider.prepare_change` has been added.
|
||||||
|
|
||||||
|
- Changed the API for :class:`mopidy.backend.PlaylistsProvider`. Note that this
|
||||||
|
change is **not** backwards compatible. These changes are important to reduce
|
||||||
|
the Mopidy startup time. (Fixes: :issue:`1057`, PR: :issue:`1075`)
|
||||||
|
|
||||||
|
- Add :meth:`mopidy.backend.PlaylistsProvider.as_list`.
|
||||||
|
|
||||||
|
- Add :meth:`mopidy.backend.PlaylistsProvider.get_items`.
|
||||||
|
|
||||||
|
- Remove :attr:`mopidy.backend.PlaylistsProvider.playlists` property.
|
||||||
|
|
||||||
**Commands**
|
**Commands**
|
||||||
|
|
||||||
- Make the ``mopidy`` command print a friendly error message if the
|
- Make the ``mopidy`` command print a friendly error message if the
|
||||||
|
|||||||
@ -300,24 +300,6 @@ class PlaylistsProvider(object):
|
|||||||
def __init__(self, backend):
|
def __init__(self, backend):
|
||||||
self.backend = backend
|
self.backend = backend
|
||||||
|
|
||||||
# TODO Replace playlists property with a get_playlists() method which
|
|
||||||
# returns playlist Ref's instead of the gigantic data structures we
|
|
||||||
# currently make available. lookup() should be used for getting full
|
|
||||||
# playlists with all details.
|
|
||||||
|
|
||||||
@property
|
|
||||||
def playlists(self):
|
|
||||||
"""
|
|
||||||
Currently available playlists.
|
|
||||||
|
|
||||||
Read/write. List of :class:`mopidy.models.Playlist`.
|
|
||||||
"""
|
|
||||||
return []
|
|
||||||
|
|
||||||
@playlists.setter # noqa
|
|
||||||
def playlists(self, playlists):
|
|
||||||
raise NotImplementedError
|
|
||||||
|
|
||||||
def as_list(self):
|
def as_list(self):
|
||||||
"""
|
"""
|
||||||
Get a list of the currently available playlists.
|
Get a list of the currently available playlists.
|
||||||
|
|||||||
@ -36,12 +36,6 @@ class PlaylistsTest(unittest.TestCase):
|
|||||||
def setUp(self): # noqa: N802
|
def setUp(self): # noqa: N802
|
||||||
self.provider = backend.PlaylistsProvider(backend=None)
|
self.provider = backend.PlaylistsProvider(backend=None)
|
||||||
|
|
||||||
def test_playlists_default_impl(self):
|
|
||||||
self.assertEqual(self.provider.playlists, [])
|
|
||||||
|
|
||||||
with self.assertRaises(NotImplementedError):
|
|
||||||
self.provider.playlists = []
|
|
||||||
|
|
||||||
def test_as_list_default_impl(self):
|
def test_as_list_default_impl(self):
|
||||||
with self.assertRaises(NotImplementedError):
|
with self.assertRaises(NotImplementedError):
|
||||||
self.provider.as_list()
|
self.provider.as_list()
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user