Fix #2469: Beatport track limit

It looks like the API uses pagination, and the default page size is 10. An
easy fix is to just request lots of tracks per page (here, 100). A nicer thing
to do in the future would be to actually traverse multiple pages.
This commit is contained in:
Adrian Sampson 2017-03-06 22:58:00 -05:00
parent 17ad3e83db
commit ad4cd7a447
2 changed files with 4 additions and 1 deletions

View file

@ -161,7 +161,8 @@ class BeatportClient(object):
:returns: Tracks in the matching release
:rtype: list of :py:class:`BeatportTrack`
"""
response = self._get('/catalog/3/tracks', releaseId=beatport_id)
response = self._get('/catalog/3/tracks', releaseId=beatport_id,
perPage=100)
return [BeatportTrack(t) for t in response]
def get_track(self, beatport_id):

View file

@ -61,6 +61,8 @@ Fixes:
:user:`awesomer`. :bug:`2457`
* :doc:`/plugins/thumbnails`: Fix a string-related crash on Python 3.
:bug:`2466`
* :doc:`/plugins/beatport`: More than just 10 songs are now fetched per album.
:bug:`2469`
1.4.3 (January 9, 2017)