Forceu / barcodebuddy

Barcode system for Grocy
GNU Affero General Public License v3.0
433 stars 58 forks source link

Discogs provider #238

Closed pwarren closed 7 months ago

pwarren commented 7 months ago

Implemented a Discogs lookup provider, have scanned in 30 of my CDs to test. Hope this is of assistance :)

pwarren commented 7 months ago

Have now scanned in >120 CDs, has been exactly what I wanted. Next up, my Movies and Books!

Forceu commented 7 months ago

Thanks, I will have a look at it tomorrow and probably merge it!

Forceu commented 7 months ago

According to the Discogs API documentation, no API key is needed. Is there a reason, why an API key field is in the menu?

pwarren commented 7 months ago

I think there are some endpoints that didn't require a token, but the search API does:

curl -s https://api.discogs.com/database/search?q=731344422424 | jq
{
  "message": "You must authenticate to access this resource."
}
curl -s "https://api.discogs.com/database/search?q=731344422424&token=$MYTOKEN" | jq .results[0].title
"Cherry Poppin' Daddies - Ferociously Stoned"
pwarren commented 7 months ago

And I did not get consistent results when using the /search?barcode= endpoint, which also requires auth

Forceu commented 7 months ago

Ah got it. Thanks!