schnatterer / nusic

your new music (android app)
GNU General Public License v3.0
42 stars 6 forks source link

UserAgent string improvements #1

Closed ianmcorvidae closed 10 years ago

ianmcorvidae commented 10 years ago

Hello! Lead dev of musicbrainz here. Always glad to see more people using our data :)

Looking at the code, specifically Nusic/src/org/musicbrainz/webservice/DefaultWebServiceWs2.java line 46, it appears the useragent nusic uses doesn't identify nusic itself, only MusicBrainz-Java -- might classify more as an issue with that library, but nevertheless should probably be changed. Other libraries, e.g. https://github.com/alastair/python-musicbrainzngs, tend to use a structure like "$app_name/$app_version $library_name/$library_version ( $app_author_contact_or_url )" -- where the library obviously provides the library name and version, and asks the app for its name, version, and contact info.

See also https://musicbrainz.org/doc/XML_Web_Service/Rate_Limiting#How_can_I_be_a_good_citizen_and_be_smart_about_using_the_Web_Service.3F

schnatterer commented 10 years ago

Hi, well thanks for providing the data and allowing access without registration or anything. I actually read that very document when developing but as I was using the musicbrainzws2-java lib that was mentioned on the official page (yeah I know still a 3rd party library) which didn't allow for changing the user agent string, I consindered it less important. Also, I'm still planning on switching to a library that allows for more efficient queries, in order to query more data with less requests.

Anyway, I'll be a better citizen from the next release on ;-)