'Filter playlists by the given criterias.
Examples::
# Returns track with name \'a\'
filter({\'name\': \'a\'})
# Returns track with URI \'xyz\'
filter({\'uri\': \'xyz\'})
# Returns track with name \'a\' and URI \'xyz\'
filter({\'name\': \'a\', \'uri\': \'xyz\'})
:param criteria: one or more criteria to match by
:type criteria: dict
:rtype: list of :class:`mopidy.models.Playlist`
.. deprecated:: 1.0
Use :meth:`as_list` and filter yourself.'

def filter(self, criteria=None, **kwargs):

    deprecation.warn(u'core.playlists.filter')
    criteria = (criteria or kwargs)
    validation.check_query(criteria, validation.PLAYLIST_FIELDS, list_values=False)
    matches = self.playlists
    for (key, value) in criteria.iteritems():
        matches = filter((lambda p: (getattr(p, key) == value)), matches)
    return matches
