diff --git a/beetsplug/spotify.py b/beetsplug/spotify.py index 3ae22cacb..4d3f9afe6 100644 --- a/beetsplug/spotify.py +++ b/beetsplug/spotify.py @@ -313,14 +313,15 @@ class SpotifyPlugin(BeetsPlugin): def candidates(self, items, artist, album, va_likely): """Returns a list of AlbumInfo objects for Spotify Search API results matching an ``album`` and ``artist`` (if not various). - - :param items: List of tracks on the candidate album + + :param items: List of items comprised by an album to be matched :type items: list[beets.library.Item] - :param artist: The of the candidate album + :param artist: The artist of the album to be matched :type artist: str - :param album: The name of the candidate album + :param album: The name of the album to be matched :type album: str - :param va_likely: True if the candidate album likely has Various Artists + :param va_likely: True if the album to be matched likely has + Various Artists :type va_likely: bool :return: Candidate AlbumInfo objects :rtype: list[beets.autotag.hooks.AlbumInfo] @@ -342,11 +343,11 @@ class SpotifyPlugin(BeetsPlugin): """Returns a list of TrackInfo objects for Spotify Search API results matching ``title`` and ``artist``. - :param item: Candidate track + :param item: Singleton item to be matched :type item: beets.library.Item - :param artist: The artist of the candidate track + :param artist: The artist of the track to be matched :type artist: str - :param title: The title of the candidate track + :param title: The title of the track to be matched :type title: str :return: Candidate TrackInfo objects :rtype: list[beets.autotag.hooks.TrackInfo] diff --git a/test/test_spotify.py b/test/test_spotify.py index e27092011..06499e8d7 100644 --- a/test/test_spotify.py +++ b/test/test_spotify.py @@ -87,10 +87,10 @@ class SpotifyPluginTest(_common.TestCase, TestHelper): self.assertEqual([], self.spotify._query_spotify(self.lib, u"")) params = _params(responses.calls[0].request.url) - self.assertEqual( - params['q'], - [u'duifhjslkef artist:ujydfsuihse album:lkajsdflakjsd'], - ) + query = params['q'][0] + self.assertIn(u'duifhjslkef', query) + self.assertIn(u'artist:ujydfsuihse', query) + self.assertIn(u'album:lkajsdflakjsd', query) self.assertEqual(params['type'], [u'track']) @responses.activate