From d2f9733296a313ae38917fd2d01fc2ff6181c02b Mon Sep 17 00:00:00 2001 From: Thomas Adamcik Date: Thu, 16 Apr 2015 00:28:09 +0200 Subject: [PATCH] core: Track.id was removed five years ago, update docs. --- mopidy/core/tracklist.py | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/mopidy/core/tracklist.py b/mopidy/core/tracklist.py index 596f759f..9d4f960b 100644 --- a/mopidy/core/tracklist.py +++ b/mopidy/core/tracklist.py @@ -399,25 +399,19 @@ class TracklistController(object): # Returns tracks with TLIDs 1, 2, 3, or 4 (tracklist ID) filter({'tlid': [1, 2, 3, 4]}) - # Returns track with IDs 1, 5, or 7 - filter({'id': [1, 5, 7]}) - # Returns track with URIs 'xyz' or 'abc' filter({'uri': ['xyz', 'abc']}) - # Returns tracks with ID 1 and URI 'xyz' - filter({'id': [1], 'uri': ['xyz']}) - - # Returns track with a matching ID (1, 3 or 6) and a matching URI - # ('xyz' or 'abc') - filter({'id': [1, 3, 6], 'uri': ['xyz', 'abc']}) + # Returns track with a matching TLIDs (1, 3 or 6) and a + # matching URI ('xyz' or 'abc') + filter({'tlid': [1, 3, 6], 'uri': ['xyz', 'abc']}) :param criteria: on or more criteria to match by :type criteria: dict, of (string, list) pairs :rtype: list of :class:`mopidy.models.TlTrack` .. deprecated:: 1.1 - Providing the criteria via ``kwargs`` is no longer supported. + Providing the criteria via ``kwargs``. """ if kwargs: deprecation.warn('core.tracklist.filter:kwargs_criteria') @@ -426,7 +420,6 @@ class TracklistController(object): tlids = criteria.pop('tlid', []) validation.check_query(criteria, validation.TRACKLIST_FIELDS) validation.check_instances(tlids, int) - # TODO: id=[1, 2, 3] filtering can't possibly be working matches = self._tl_tracks for (key, values) in criteria.items():