Discogs is an online music database with enormous breadth and depth. At the time of writing this blog post, musical releases in the database number a whopping 6,121,612. For each release, metadata are provided about the release; and amongst this data are album covers. This makes Discogs one of the primary sources for album covers on the Web.

There's a downside though. One of the reasons for the Discogs database's growth is its crowd-sourced nature; users of the Discogs website are the ones that provide this metadata. This means the data itself isn't necessarily high quality. In most cases, a submission and editing process deals with objectively errant metadata. However, more subjective data quality can sometimes be more suspect; and a primary example of this are album covers.

Broadly, the quality of album covers on Discogs is pretty good. But sometimes you will find releases which have low resolution cover art. An example of this is the US CD release of Thirteen Tales From Urban Bohemia by the Dandy Warhols.

Discogs page for Thirteen Tales From Urban Bohemia

The cover art stored for this release is just 170x170 pixels in size. This is not nearly large enough for display on modern devices. If you write an application to help music lovers show artwork in their collection, you're going to need much larger artwork.

Luckily, we can use OneMusicAPI to find higher resolution artwork for Discogs releases.

The key is the Discogs ID query for releases. When you make this query, OneMusicAPI not only finds Discogs metadata for the specified release, but also more metadata and images for the same release but from other sites, such as MusicBrainz and Wikipedia.

Here's what such a query looks like:

http://api.onemusicapi.com/release?discogsId=367092&inc=images&minCertainty=0.95&user_key=...

Three parameters are used. discogsId is self explanatory - it's the Discogs release ID. inc=images is required so that images are included in the results. minCertainty is required to make sure OneMusicAPI links this Discogs release to data on other databases. If you specify 1 then only the Discogs data is returned. Anything of 0.95 or less will begin to also returned link data.

The results will look something like [I've removed most of the non-image data for brevity]:

[
    {
        "title": "Thirteen Tales From Urban Bohemia",
        "artist": "Dandy Warhols, The",
        "year": "2000",
        "genre": "Rock",
        "media": [
            {
                "totalDiscs": "1",
                "position": "1",
                "tracks": [
                    {
                        "title": "Godless",
                        "number": "1"
                    },
                    {
                        "title": "Bohemian Like You",
                        "number": "10"
                    },
                    [...]
                ]
            }
        ],
        "images": [
            {
                "url": "http://api.onemusicapi.com/20140925/images/caa/a480641f-8e78-4c8f-ba39-4f1c1067349f/6596309888.jpg",
                "width": "500",
                "height": "500"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/asin/B00004TA8K.jpg",
                "width": "500",
                "height": "500"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/caa/26f1cd15-2dcd-35d4-91c0-f50ce8da5fca/6596307537.jpg",
                "width": "500",
                "height": "500"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/discogs/5551225/1396308108-7941",
                "width": "587",
                "height": "600"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/discogs/862350/1259952532",
                "width": "600",
                "height": "600"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/discogs/391912/1300936714",
                "width": "600",
                "height": "600"
            },
            {
                "url": "http://api.onemusicapi.com/20140925/images/caa/ff582161-b221-3938-a00d-019a5f81742b/6596304429.jpg",
                "width": "500",
                "height": "500"
            }
        ],
        "score": 1
    }
]

So that gives us a number of extra images, all of which are at least 500x500 in resolution.

This higher resolution artwork is much more likely to be sufficient for display on large format and higher resolution devices, so your users can more easily navigate their music library!

Thanks to ThomasKohler who made the the image above available for sharing.
comments powered by Disqus
© 2016 elsten software limited, Unit 4934, PO Box 6945, London, W1A 6US, UK | terms and conditions | privacy policy