ParkSquare.Gracenote 2.0.14

Install-Package ParkSquare.Gracenote -Version 2.0.14
dotnet add package ParkSquare.Gracenote --version 2.0.14
<PackageReference Include="ParkSquare.Gracenote" Version="2.0.14" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ParkSquare.Gracenote --version 2.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ParkSquare.Gracenote, 2.0.14"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ParkSquare.Gracenote as a Cake Addin
#addin nuget:?package=ParkSquare.Gracenote&version=2.0.14

// Install ParkSquare.Gracenote as a Cake Tool
#tool nuget:?package=ParkSquare.Gracenote&version=2.0.14
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

C# Gracenote Music Database Library

Build Status

Background

This library provides access to the Gracenote music database, with support for track, album, artist and cover artwork searching.

Given the difficulty in obtaining new keys to access the Gracenote APIs, we will no longer be actively developing or supporting this Nuget package from 1 May 2021. Most of the original Gracenote Developer links are now dead. We recommend you use Discogs instead for your programmatic music metadata needs, using our Discogs Nuget Package.

Getting Started

The Gracenote Developer license is free for non-commercial use.

This C# library supports ALBUM_SEARCH and ALBUM_FETCH, with all options available that are exposed by the Gracenote API itself. For more information, visit the Gracenote Developer Zone.

To begin development, the first thing you need to do is get a Client ID - a Gracenote API key that authorizes you to make calls to the Gracenote service. See Gracenote Developer Zone for further information. Once you have a Client ID, calling the Web API using ParkSquare.Gracenote is really easy.

Create a GracenoteClient

First, instantiate a new GracenoteClient object, passing in your API key:

var client = new GracenoteClient("1111111-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");

You can now perform an album search, or an album fetch.

Search for an Album

This perform a search of the Gracenote database. It is possible to specify any combination of Album Title, Artist or Track Title. There are three search modes available:

  • Default - Returns all matching albums
  • BestMatch - Returns a single album that best matches your search criteria
  • BestMatchWithCover - As per BestMatch but also return the URL to an album art image, if available.

There are various other options that can include additional information about the album in the search results. Multiple flags can be specified.

var x = client.Search(new SearchCriteria
    {
        AlbumTitle = "Use Your Illusion",
        Artist = "Guns 'n' Roses",
        SearchMode = SearchMode.BestMatchWithCoverArt,
        SearchOptions = SearchOptions.Mood | SearchOptions.Tempo
    });

A wider search for all albums by the specified artist, with an image of the artist instead of the album artwork (if available):

var y = client.Search(new SearchCriteria
    {
        Artist = "Pet Shop Boys",
        SearchMode = SearchMode.BestMatchWithCoverArt,
        SearchOptions = SearchOptions.Cover | SearchOptions.ArtistImage
    });

Get Album Metadata

This is used when you already have the GracenoteId for an album and just want to retrieve it.

// Fetch an album using a known Gracenote ID
var x = client.Search("99337157-E1ED6101A3666CFD7D799529ED707E0F");

Download Album Artwork

If you have specified that you want artwork returned, and artwork is available, then you will see a collection of Artwork objects available to you. These will generally contain URLs to a CDN containing the image.

You can call the Download() method on any Artwork object to retrieve the image and save it to your local file system.

var test = client.Search(new SearchCriteria
{
    Artist = "Guns 'n' Roses",
    TrackTitle = "November Rain",
    SearchMode = SearchMode.BestMatchWithCoverArt,
    SearchOptions = SearchOptions.ArtistImage
});

test.Albums.First().Artwork.First().Download("C:\temp\AlbumArt.jpg");

Paging

Where a search yields many results, or it is desirable to page through the results, you can specify a start item and end item in your request. For example, this will return only the 10th to 14th results in the response:

var k = client.Search(new SearchCriteria
{
    Artist = "Guns 'n' Roses",
    Range = new Range(10, 14)
});
  • .NETStandard 2.1

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
2.0.14 55 11/22/2021
2.0.12 74 11/18/2021
2.0.6 172 5/16/2021
2.0.5 162 4/18/2021
2.0.3 220 4/18/2021
2.0.2 553 7/2/2019
2.0.1 387 6/5/2019
2.0.0 364 6/4/2019
1.6.4 814 7/4/2018
1.6.3 1,153 1/7/2017
1.6.2 675 1/7/2017
1.6.1 663 1/7/2017
1.6.0 665 1/7/2017
1.5.0 683 1/7/2017
1.4.0 863 8/23/2016
1.3.0 1,752 2/19/2015
1.2.0 1,151 9/6/2014
1.1.0 975 5/28/2014
1.0.3 888 8/23/2016
1.0.2 930 4/29/2014
0.9.0 895 4/25/2014