diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index 5c2d91e0..584a8bb9 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -290,7 +290,8 @@ class TracklistController(object): def filter(self, criteria=None, **kwargs): """ - Filter the tracklist by the given criterias. + Filter the tracklist by the given criterias. The value of the field to + check can be a list or a set. Examples:: @@ -333,7 +334,7 @@ class TracklistController(object): criteria = criteria or kwargs matches = self._tl_tracks for (key, value) in criteria.iteritems(): - if not type(value) is list: + if not type(value) in [list, set]: value = [value] if key == 'tlid': matches = filter(lambda ct: ct.tlid in value, matches)