Giter Site home page Giter Site logo

Getting artists by tag about musicbrainz HOT 13 CLOSED

avatar29a avatar avatar29a commented on July 29, 2024
Getting artists by tag

from musicbrainz.

Comments (13)

wo80 avatar wo80 commented on July 29, 2024

I'm not sure this can be done with the webservice. Obviously, you could do

var artists = await Artist.SearchAsync("tag:pop");
// http://musicbrainz.org/ws/2/artist/?query=tag:pop&fmt=json

but this does not return the list as presented on https://beta.musicbrainz.org/tag/pop/artist (which seems to be sorted by some kind of 'relevance').

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

I get you.

All these different possibilities with Browse, search or Get is confusing.
3 different methods to get different data.
I know that it is how MusicBrainz works, i guess it's just learning curve.

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

For example, trying to do:
http://beta.musicbrainz.org/ws/2/release-group/a1084754-8bb5-3ebc-bbd2-6a27d48e798a?inc=ratings+releases

I wrote
var artistTracks = await ReleaseGroup.BrowseAsync("", AlbumMbid, 20, 0, "ratings","releases");
something is wrong with the query string.

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

I guess after i get into it more i can assist in documentation.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

The link corresponds to "get release-group with given MBID and include ratings+releases".

The C# code is missing the related entity (first parameter) to browse for. If it was "artist", the meaning would be "browse all release-groups that are directly linked to artist with given MBID and include ratings+releases".

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

i did try
await ReleaseGroup.BrowseAsync("artist", AlbumMbid, 20, 0, "ratings","releases");
but i get exception .

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

Take a look at https://wiki.musicbrainz.org/Development/XML_Web_Service/Version_2#Browse

Browsing release-groups does not support including "releases".

At the moment, the exceptions thrown when the webservice fails are not instructive at all. If you look at the response of the request, corresponding to the C# code

http://musicbrainz.org/ws/2/release-group?artist=45a663b5-b1cb-4a91-bff6-2bef7bbfdd76&limit=20&offset=0&inc=ratings+releases&fmt=json

error: "releases is not a valid inc parameter for the release-group resource."

you can see the problem. This error message should be included in the exception thrown, so:

please leave this issue open until it gets addressed :-)

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

Sure,

I want to elaborate what i am trying to do and if it is possible:
First i get artist main albums:
ReleaseGroup.BrowseAsync("artist", artistMbid, limit, 0, "ratings");

I save aside the release group mbid,

Now i want to get the tracks of only one (main one preferable) of that release group, this i where i am stuck. :)

Regarding errors, just a suggestion, to show what MusicBrainz returns as error.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

Just chain a couple of requests:

  1. Browse release-groups: ReleaseGroup.BrowseAsync("artist", artist_id, ...).
  2. Find mbid of release-group you are interested in (don't know what you mean by main one preferable).
  3. Get details of release-group: ReleaseGroup.GetAsync(group_id, "artists", "releases").
  4. Find mbid of release you are interested in.
  5. Get details of release: Release.GetAsync(release_id, "recordings").

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

Great, will check that out.

Regarding "main one", since there are many releases per release group, i need only to feach 1 release from the group. Question is, which 1 to fetch? maybe first country that released it.

from musicbrainz.

wo80 avatar wo80 commented on July 29, 2024

Yeah, I usually do something like

var release = releases.Items
    .Where(r => r.Date != null)
    .OrderBy(r => r.Date)
    .First();

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

That's great, i appreciate that.

Leaving this thread open until exception error:

"releases is not a valid inc parameter for the release-group resource."

is handled.
Link: http://musicbrainz.org/ws/2/release-group?artist=45a663b5-b1cb-4a91-bff6-2bef7bbfdd76&limit=20&offset=0&inc=ratings+releases&fmt=json

from musicbrainz.

ColorTwist avatar ColorTwist commented on July 29, 2024

error: "releases is not a valid inc parameter for the release-group resource."
fixed, now it shows the error.

from musicbrainz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.