'Get the available playlists.
:rtype: list of :class:`mopidy.models.Playlist`
.. versionchanged:: 1.0
If you call the method with ``include_tracks=False``, the
:attr:`~mopidy.models.Playlist.last_modified` field of the returned
playlists is no longer set.
.. deprecated:: 1.0
Use :meth:`as_list` and :meth:`get_items` instead.'

def get_playlists(self, include_tracks=True):

    deprecation.warn(u'core.playlists.get_playlists')
    playlist_refs = self.as_list()
    if include_tracks:
        playlists = {r.uri: self.lookup(r.uri) for r in playlist_refs}
        return [playlists[r.uri].replace(name=r.name) for r in playlist_refs if (playlists[r.uri] is not None)]
    else:
        return [Playlist(uri=r.uri, name=r.name) for r in playlist_refs]
