mirror of
https://github.com/beetbox/beets.git
synced 2025-12-06 16:42:42 +01:00
Merge pull request #4200 from dschrempf/deezer-paginate
This commit is contained in:
commit
bcf0728248
2 changed files with 9 additions and 2 deletions
|
|
@ -77,11 +77,16 @@ class DeezerPlugin(MetadataSourcePlugin, BeetsPlugin):
|
||||||
"by {} API: '{}'".format(self.data_source, release_date)
|
"by {} API: '{}'".format(self.data_source, release_date)
|
||||||
)
|
)
|
||||||
|
|
||||||
tracks_data = requests.get(
|
tracks_obj = requests.get(
|
||||||
self.album_url + deezer_id + '/tracks'
|
self.album_url + deezer_id + '/tracks'
|
||||||
).json()['data']
|
).json()
|
||||||
|
tracks_data = tracks_obj['data']
|
||||||
if not tracks_data:
|
if not tracks_data:
|
||||||
return None
|
return None
|
||||||
|
while "next" in tracks_obj:
|
||||||
|
tracks_obj = requests.get(tracks_obj['next']).json()
|
||||||
|
tracks_data.extend(tracks_obj['data'])
|
||||||
|
|
||||||
tracks = []
|
tracks = []
|
||||||
medium_totals = collections.defaultdict(int)
|
medium_totals = collections.defaultdict(int)
|
||||||
for i, track_data in enumerate(tracks_data, start=1):
|
for i, track_data in enumerate(tracks_data, start=1):
|
||||||
|
|
|
||||||
|
|
@ -14,6 +14,8 @@ New features:
|
||||||
|
|
||||||
Bug fixes:
|
Bug fixes:
|
||||||
|
|
||||||
|
* :doc:`/plugins/deezer`: Fix auto tagger pagination issues (fetch beyond the
|
||||||
|
first 25 tracks of a release).
|
||||||
* :doc:`/plugins/spotify`: Fix auto tagger pagination issues (fetch beyond the
|
* :doc:`/plugins/spotify`: Fix auto tagger pagination issues (fetch beyond the
|
||||||
first 50 tracks of a release).
|
first 50 tracks of a release).
|
||||||
* :doc:`/plugins/lyrics`: Fix Genius search by using query params instead of body.
|
* :doc:`/plugins/lyrics`: Fix Genius search by using query params instead of body.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue