Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get releases by release group id #47

Closed
ColorTwist opened this issue Nov 24, 2019 · 2 comments
Closed

Get releases by release group id #47

ColorTwist opened this issue Nov 24, 2019 · 2 comments

Comments

@ColorTwist
Copy link

Question,
I am using the following to get releases of a release group using:
ReleaseGroup releaseGroupList =ReleaseGroup.GetAsync(releaseGroup.Id, "artists", "releases");``
and then uses releaseGroupList.Releases with LINQ to get `Offical` status,
Is there a more elegant way to do a method?

@wo80
Copy link
Collaborator

wo80 commented Nov 24, 2019

Try this:

var query = new QueryParameters<Release>()
{
    { "rgid", releaseGroupId }
};

// Get releases with status = official.
query.Add("status", "official");

var releases = Release.SearchAsync(query);

You can find out more about available search fields in the MusicBrainz search documentation.

@ColorTwist
Copy link
Author

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants