David-Desmaisons / DiscogsClient

Discogs API C# Client
MIT License
41 stars 16 forks source link

GetAllLabelReleases does not return all the releases from a Label #13

Closed isaacgimenez closed 5 years ago

isaacgimenez commented 5 years ago

Fetching releases from a label that contains a huge amount of them seems we hit the rate limit.

Here 2 labels to test with: Label Id=1967 Label Id=10663

And perhaps this can help a bit too:

DiscogsClient.GenerateFromPaginable

var res = await _Client.Execute(request, cancel); var elements = res?.GetResults(); if (elements == null) return; //If we hit the limit, response is empty but all pages have not being retrieved.

David-Desmaisons commented 5 years ago

DiscosgsClient already use a ratelimit facility to prevent this kind of problem: SharedTimeLimiter = TimeLimiter.GetFromMaxCountByInterval(240, TimeSpan.FromMinutes(1)); Could you check the http response code, using a sniffer like Fiddler, to check thta rate limit is the problem?

isaacgimenez commented 5 years ago

Discogs Api limit is set to 60. This are the actual headers Discogs is providing on the response X-Discogs-Ratelimit=60 X-Discogs-Ratelimit-Used=60 X-Discogs-Ratelimit-Remaining=0

David-Desmaisons commented 5 years ago

Thanks, I will update ratelimit

isaacgimenez commented 5 years ago

Thanks to you for the your help

Are you hoping torelease a new nuget version? Or that will still take some time?

Thanks again.

David-Desmaisons commented 5 years ago

It as available now: version 2.5.1