mirror of
https://git.sr.ht/~phw/scotty
synced 2025-04-16 10:09:28 +02:00
listenbrainz: fixed listens pagination
This commit is contained in:
parent
ca99a3d5fb
commit
0045a5096e
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ out:
|
|||
func (b *ListenBrainzApiBackend) ImportListens(export models.ListensResult, importResult models.ImportResult, progress chan models.Progress) (models.ImportResult, error) {
|
||||
total := len(export.Listens)
|
||||
for i := 0; i < total; i += MaxListensPerRequest {
|
||||
listens := export.Listens[i:min(i+MaxItemsPerGet, total)]
|
||||
listens := export.Listens[i:min(i+MaxListensPerRequest, total)]
|
||||
count := len(listens)
|
||||
if count == 0 {
|
||||
break
|
||||
|
|
Loading…
Add table
Reference in a new issue