-
Notifications
You must be signed in to change notification settings - Fork 57
Description
Hi everyone!
I've noticed that the number of returned results from the search function doesn't match the count attribute of the class.
For example, the following code:
import discogs_client
client= discogs_client.Client(use_agent="USER_AGENT", user_token="USER_TOKEN")
results = client.search("Daft Punk One more time", type="master")
search_results_dicts = [result.data for result in results]
print(results.count == len(search_results_dicts))
print(results.count)
print(len(search_results_dicts))
would return:
>>> False
>>> 82
>>> 80
Interestingly, if you actually go to the Discogs webpage (in this case, that would be: https://www.discogs.com/search/?q=Daft+Punk+One+more+time&type=master) you will notice that the count specified is indeed 82 but if you count the items, you would only get to 80.
On the first page, you will see 1 out of 50 although there are only 48 items (6 items per row in 8 rows on PC) and the second one that has 32 items (from 51 to 82) and with the correct count.
Therefore, I believe that this comes from the Discogs API rather than the package itself.
Hope this help with further development!